當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ApplicationRef.tick方法代碼示例

本文整理匯總了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);
  });
開發者ID:Blackbaud-DanHamlin,項目名稱:skyux2,代碼行數:13,代碼來源:wait.service.spec.ts

示例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');
  }));
開發者ID:Blackbaud-DanHamlin,項目名稱:skyux2,代碼行數:13,代碼來源:modal.service.spec.ts

示例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;
 }
開發者ID:kahboom,項目名稱:angular2-webpack-starter,代碼行數:7,代碼來源:app.module.ts

示例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();
 });
開發者ID:kevinheader,項目名稱:nebular,代碼行數:7,代碼來源:datepicker.spec.ts

示例5: onOpen

 onOpen(){
     this.isShow = true;
     setTimeout(()=>{
         document.removeEventListener('click', this.documentClick)
         document.addEventListener('click', this.documentClick)
     },100)
     this.ref.tick()
 }
開發者ID:Maxislav,項目名稱:Atlas-Angular2,代碼行數:8,代碼來源:menu-list-component.ts

示例6: hmrOnInit

 public hmrOnInit(store: StoreType) {
   if (!store || !store.state) {
     return;
   }
   this.appState._state = store.state;
   this.appRef.tick();
   delete store.state;
 }
開發者ID:ZlaWrozka,項目名稱:ng-kux,代碼行數:8,代碼來源:app.module.ts

示例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);
  });
開發者ID:Blackbaud-DanHamlin,項目名稱:skyux2,代碼行數:18,代碼來源:wait.service.spec.ts

示例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);

  }));
開發者ID:Blackbaud-DanHamlin,項目名稱:skyux2,代碼行數:19,代碼來源:wait.service.spec.ts

示例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();
 });
開發者ID:Maxislav,項目名稱:Atlas-Angular2,代碼行數:10,代碼來源:map.service.ts


注:本文中的@angular/core.ApplicationRef.tick方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。