You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The request is for an example to fetch options for a select field from a remote API through a service.
Below is an option that I tried, however I couldn't get it to work.
I tried extending the FormlyFieldSelect but I am not able to inject a service into the constructor of the child class. The service always comes up as undefined.
import { NgModule, Component, OnInit} from '@angular/core';
import { EntityrecordApi } from '../sdk/services/custom';
import { Injectable, Inject } from '@angular/core';
import { FormlyFieldSelect } from 'ng2-formly';
@Component({
selector: 'formly-field-lookup-select',
providers: [EntityrecordApi],
template:'<div>Test</div>'
})
export class LookupSelect extends FormlyFieldSelect implements OnInit{
constructor(private _EntityrecordApi: EntityrecordApi) {
super()
}
ngOnInit(): void {
//Do Something here
this._EntityrecordApi.find()
}
}
The text was updated successfully, but these errors were encountered:
I'm submitting a support request.
The request is for an example to fetch options for a select field from a remote API through a service.
Below is an option that I tried, however I couldn't get it to work.
I tried extending the FormlyFieldSelect but I am not able to inject a service into the constructor of the child class. The service always comes up as
undefined
.The text was updated successfully, but these errors were encountered: