本文整理汇总了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))
})
}