本文整理汇总了TypeScript中@angular/core.ApplicationRef.tick方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ApplicationRef.tick方法的具体用法?TypeScript ApplicationRef.tick怎么用?TypeScript ApplicationRef.tick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/core.ApplicationRef
的用法示例。
在下文中一共展示了ApplicationRef.tick方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should clear appropriate waits when clearPageWait is called', () => {
waitService.beginNonBlockingPageWait();
applicationRef.tick();
waitService.beginBlockingPageWait();
applicationRef.tick();
waitService.clearAllPageWaits();
applicationRef.tick();
verifyNonBlockingPageWaitExists(false);
verifyBlockingPageWaitExists(false);
});
示例2: it
it('should show a modal and return an instance that can then be closed', fakeAsync(() => {
let modalInstance = openModal(ModalTestComponent);
applicationRef.tick();
expect(document.body.querySelector('.sky-modal')).toExist();
expect(document.body).toHaveCssClass('sky-modal-body-open');
closeModal(modalInstance);
tick();
applicationRef.tick();
expect(document.body.querySelector('.sky-modal')).not.toExist();
expect(document.body).not.toHaveCssClass('sky-modal-body-open');
}));
示例3: hmrOnInit
hmrOnInit(store) {
if (!store || !store.state) return;
console.log('HMR store', store);
this.appState._state = store.state;
this.appRef.tick();
delete store.state;
}
示例4: it
it('should start from current date if input value is invalid', () => {
input.value = 'definitely not a date';
input.dispatchEvent(new Event('input'));
showRangepicker();
appRef.tick();
expect(overlay.querySelector('.day-cell.today')).toBeDefined();
});
示例5: onOpen
onOpen(){
this.isShow = true;
setTimeout(()=>{
document.removeEventListener('click', this.documentClick)
document.addEventListener('click', this.documentClick)
},100)
this.ref.tick()
}
示例6: hmrOnInit
public hmrOnInit(store: StoreType) {
if (!store || !store.state) {
return;
}
this.appState._state = store.state;
this.appRef.tick();
delete store.state;
}
示例7: verifyNonBlockingPageWaitExists
() => {
waitService.beginNonBlockingPageWait();
applicationRef.tick();
verifyNonBlockingPageWaitExists(true);
waitService.beginNonBlockingPageWait();
applicationRef.tick();
verifyNonBlockingPageWaitExists(true);
waitService.endNonBlockingPageWait();
applicationRef.tick();
verifyNonBlockingPageWaitExists(true);
waitService.endNonBlockingPageWait();
applicationRef.tick();
verifyNonBlockingPageWaitExists(false);
});
示例8: fakeAsync
fakeAsync(() => {
waitService.beginBlockingPageWait();
applicationRef.tick();
verifyBlockingPageWaitExists(true);
waitService.beginBlockingPageWait();
applicationRef.tick();
verifyBlockingPageWaitExists(true);
waitService.endBlockingPageWait();
applicationRef.tick();
verifyBlockingPageWaitExists(true);
waitService.endBlockingPageWait();
applicationRef.tick();
verifyBlockingPageWaitExists(false);
}));
示例9:
map.on('move', (e) => {
//console.log()
this.pitch = map.getPitch().toFixed(0);
this.bearing = map.getBearing().toFixed(1);
this.zoom = map.getZoom().toFixed(1);
let LngLat = map.getCenter();
this.lngMap = LngLat.lng.toFixed(4);
this.latMap = LngLat.lat.toFixed(4);
this.ref.tick();
});