本文整理匯總了TypeScript中@horizon/client.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(private trafficChartService:TrafficChartService) {
this.doughnutData = trafficChartService.getData();
this.transactions = [];
const horizon = Horizon({ host: 'localhost:8181' });
this.socket = horizon("transactions");
this.socket.watch().subscribe((item) => { this.aggregateData(item) });
this.storeTransaction();
}
示例2: ngOnInit
ngOnInit() {
this.data = this._chartistJsService.getAll();
const horizon = Horizon({ host: 'localhost:8181' });
this.socket = horizon("transactions");
this.socket.watch().subscribe((item) => { this.aggregateData(item) });
// this.transactions = this.socket.watch();
// setInterval(this.storeTransaction, 3000);
}
示例3: ngOnInit
ngOnInit() {
console.log('here');
const horizon = Horizon({ host: 'localhost:8181' });
this.socket = horizon("transactions");
this.socket.watch().subscribe((item) => { this.aggregateData(item) });
this.chartData = this._bubbleMapsService.getData(this.mapData);
// this.storeTransaction();
}
示例4: dispatch
return dispatch => {
dispatch(getWorkoutRequest(id))
hz('workouts').find(id).watch().subscribe(workout => {
dispatch(getWorkoutSuccess(workout))
}, (err) => {
dispatch(getWorkoutError(err))
})
}