本文整理匯總了TypeScript中angular2/core.ApplicationRef.tick方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ApplicationRef.tick方法的具體用法?TypeScript ApplicationRef.tick怎麽用?TypeScript ApplicationRef.tick使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angular2/core.ApplicationRef
的用法示例。
在下文中一共展示了ApplicationRef.tick方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: setTimeout
router.subscribe(() => {
// This is needed for the back button to work correctly on iOS and Safari.
this._applicationRef.tick();
setTimeout(() => {
this._applicationRef.tick();
}, 100);
});
示例2:
this.blogServer.list().then((result)=>{
if(result.code == StatusCode.success) {
this.blogList = result.data.list;
this.count = result.data.count;
this.page = result.data.page;
this.applicationRef.tick();
}else{
console.log(result);
}
}).catch((result)=>{
示例3:
this.unsubscribe = ngRedux.subscribe(() => {
applicationRef.tick();
});
示例4:
state => {
console.log('Received new store state: ', state.todos);
this.todos = state.todos;
applicationRef.tick();
}
示例5:
this.router.subscribe(() => {
this.applicationRef.tick();
});