当前位置: 首页>>代码示例>>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;未经允许,请勿转载。