var promise_source = this.crudService.get(Constants.URL_API).then((data2: any) => { this.enable = true; return Promise.resolve(data2); }); this..source = this.completerService.local(Observable.fromPromise(promise_source), "name", "des");
The initial value of enable is false, but is changed whit the response api and in the view the completer still disabled.
I have the next template and component.
<ng2-completer disableInput="!enable" formControlName="control" [inputClass]="'form-control'" [(ngModel)]="input" [datasource]="source" [maxChars]="12" [minSearchLength]="2" (blur)="onBlur()"
var promise_source = this.crudService.get(Constants.URL_API).then((data2: any) => { this.enable = true; return Promise.resolve(data2); }); this..source = this.completerService.local(Observable.fromPromise(promise_source), "name", "des");
The initial value of enable is false, but is changed whit the response api and in the view the completer still disabled.