本文整理匯總了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();
});