Получение этой ошибки, когда я набираю более 3 символов в поле ввода.
TypeError: вы предоставили недопустимый объект там, где ожидался поток. Вы можете предоставить Observable, Promise, Array или Iterable.
.html файл:
<input class="form-control"
type="text"
[typeahead]="dataSourceObservable"
typeaheadOptionField="address1"
typeaheadGroupField="city"
[typeaheadMinLength]="3"
(typeaheadOnSelect)="setAddress($event)"
id="{{componentId}}"
maxlength="100"
allowedPattern="^[a-zA-Z0-9\s\.\-\#]*$"
appPatternRestrict
[formControl]="componentFormControl"
[(ngModel)]="quoteReference[jsonField]"
[typeaheadOptionsLimit]="20"
[appDisableControl]="componentDetails.locked"
placeholder=" "
/>
.ts файл:
public dataSourceObservable: Observable<any>;
constructor(public quoteDataService: QuoteDataService, public addressPrefillService: AddressPrefillService, public store$: Store<State>) {
super(quoteDataService, store$);
// Required for type ahead for values, do not remove unless thoroughly tested.
this.dataSourceObservable = Observable.create(() => {})
}
ngOnInit() {
this.componentFormControl.valueChanges
.subscribe(value => {
let address = null;
this.store$.pipe(select(currentQuote)).pipe(take(1)).subscribe(val=>{
if(val ) {
if(val.garageAddress) {
address = val.garageAddress;
}
}
});
if (address && address.zipCode !== null) {
let request = {
"zipCode": address.zipCode,
"addressLine1": value
};
this.dataSourceObservable = this.addressPrefillService.prefillAddress(request);
}
});
}
this.dataSourceObservable = this.addressPrefillService.prefillAddress(request);
определение - person Just code   schedule 30.01.2019