答案 0 :(得分:0)
只需将组合框绑定到您的异步数据,它就会自动检测可观察的更新或承诺解决方案
<kendo-combobox [data]="tickers" [valuePrimitive]="false" [textField]="'name'" >
</kendo-combobox>
/* Obtain tickers from async operation */
答案 1 :(得分:0)
通过async pipe绑定到异步数据(Observables)。 应通过以下具体示例改进文档:
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/operator/bufferCount';
@Component({
selector: 'my-app',
template: `
<kendo-combobox [data]="tickers | async"></kendo-combobox>
`
})
export class AppComponent {
/* Start with an empty observable */
public tickers: Observable<number[]>;
constructor() {
/* Produce 1 random value each 1000ms
and emit it in batches of 10. */
this.tickers = Observable.interval(100)
.bufferCount(10);
}
}