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


TypeScript ToastModule.forRoot方法代碼示例

本文整理匯總了TypeScript中ng2-toastr.ToastModule.forRoot方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ToastModule.forRoot方法的具體用法?TypeScript ToastModule.forRoot怎麽用?TypeScript ToastModule.forRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ng2-toastr.ToastModule的用法示例。


在下文中一共展示了ToastModule.forRoot方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: describe

describe('PoolListComponent', () => {
  let component: PoolListComponent;
  let fixture: ComponentFixture<PoolListComponent>;

  configureTestBed({
    declarations: [PoolListComponent, MirrorHealthColorPipe],
    imports: [
      SharedModule,
      BsDropdownModule.forRoot(),
      TabsModule.forRoot(),
      ProgressbarModule.forRoot(),
      HttpClientTestingModule,
      RouterTestingModule,
      ToastModule.forRoot()
    ],
    providers: i18nProviders
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(PoolListComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
開發者ID:IlsooByun,項目名稱:ceph,代碼行數:28,代碼來源:pool-list.component.spec.ts

示例2: describe

describe('RbdListComponent', () => {
  let component: RbdListComponent;
  let fixture: ComponentFixture<RbdListComponent>;

  configureTestBed({
    imports: [
      SharedModule,
      BsDropdownModule.forRoot(),
      TabsModule.forRoot(),
      ModalModule.forRoot(),
      TooltipModule.forRoot(),
      ToastModule.forRoot(),
      AlertModule.forRoot(),
      ComponentsModule,
      RouterTestingModule,
      HttpClientTestingModule
    ],
    declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(RbdListComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
開發者ID:noahdesu,項目名稱:ceph,代碼行數:30,代碼來源:rbd-list.component.spec.ts

示例3: describe

describe('UserTabsComponent', () => {
  let component: UserTabsComponent;
  let fixture: ComponentFixture<UserTabsComponent>;

  configureTestBed({
    imports: [
      SharedModule,
      ToastModule.forRoot(),
      TabsModule.forRoot(),
      RouterTestingModule,
      HttpClientTestingModule
    ],
    declarations: [UserTabsComponent]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(UserTabsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
開發者ID:C2python,項目名稱:ceph,代碼行數:25,代碼來源:user-tabs.component.spec.ts

示例4: describe

describe('RbdSnapshotFormComponent', () => {
  let component: RbdSnapshotFormComponent;
  let fixture: ComponentFixture<RbdSnapshotFormComponent>;

  configureTestBed({
    imports: [
      ReactiveFormsModule,
      ComponentsModule,
      HttpClientTestingModule,
      ServicesModule,
      ApiModule,
      ToastModule.forRoot(),
      RouterTestingModule
    ],
    declarations: [RbdSnapshotFormComponent],
    providers: [BsModalRef, BsModalService, AuthStorageService, i18nProviders]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(RbdSnapshotFormComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
開發者ID:IlsooByun,項目名稱:ceph,代碼行數:28,代碼來源:rbd-snapshot-form.component.spec.ts

示例5: describe

describe('RbdImagesComponent', () => {
  let component: RbdImagesComponent;
  let fixture: ComponentFixture<RbdImagesComponent>;

  configureTestBed({
    declarations: [
      RbdDetailsComponent,
      RbdImagesComponent,
      RbdListComponent,
      RbdSnapshotListComponent,
      RbdTrashListComponent,
      RbdConfigurationListComponent
    ],
    imports: [
      HttpClientTestingModule,
      RouterTestingModule,
      SharedModule,
      TabsModule.forRoot(),
      ToastModule.forRoot(),
      TooltipModule.forRoot()
    ],
    providers: [TaskListService, i18nProviders]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(RbdImagesComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
開發者ID:LenzGr,項目名稱:ceph,代碼行數:34,代碼來源:rbd-images.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [RouterTestingModule, ToastModule.forRoot()],
     declarations: [AppComponent],
     schemas: [NO_ERRORS_SCHEMA],
     providers: [{ provide: AuthStorageService, useValue: fakeService }]
   }).compileComponents();
 }));
開發者ID:hzhang-wx,項目名稱:ceph,代碼行數:8,代碼來源:app.component.spec.ts

示例7: describe

describe('RbdFormComponent', () => {
  let component: RbdFormComponent;
  let fixture: ComponentFixture<RbdFormComponent>;
  let activatedRoute: ActivatedRouteStub;

  configureTestBed({
    imports: [
      HttpClientTestingModule,
      ReactiveFormsModule,
      RouterTestingModule,
      ToastModule.forRoot(),
      SharedModule
    ],
    declarations: [RbdFormComponent],
    providers: [
      {
        provide: ActivatedRoute,
        useValue: new ActivatedRouteStub({ pool: 'foo', name: 'bar', snap: undefined })
      },
      i18nProviders
    ]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(RbdFormComponent);
    component = fixture.componentInstance;
    activatedRoute = TestBed.get(ActivatedRoute);
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });

  describe('should test decodeURIComponent of params', () => {
    let rbdService: RbdService;

    beforeEach(() => {
      rbdService = TestBed.get(RbdService);
      component.mode = RbdFormMode.editing;
      fixture.detectChanges();
      spyOn(rbdService, 'get').and.callThrough();
    });

    it('without snapName', () => {
      activatedRoute.setParams({ pool: 'foo%2Ffoo', name: 'bar%2Fbar', snap: undefined });

      expect(rbdService.get).toHaveBeenCalledWith('foo/foo', 'bar/bar');
      expect(component.snapName).toBeUndefined();
    });

    it('with snapName', () => {
      activatedRoute.setParams({ pool: 'foo%2Ffoo', name: 'bar%2Fbar', snap: 'baz%2Fbaz' });

      expect(rbdService.get).toHaveBeenCalledWith('foo/foo', 'bar/bar');
      expect(component.snapName).toBe('baz/baz');
    });
  });
});
開發者ID:IlsooByun,項目名稱:ceph,代碼行數:58,代碼來源:rbd-form.component.spec.ts

示例8: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       ToastModule.forRoot()
     ],
     declarations: [
       AppComponent
     ],
   }).compileComponents();
 }));
開發者ID:wolfhoundjesse,項目名稱:AMI,代碼行數:11,代碼來源:app.component.spec.ts

示例9: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       SharedModule,
       ToastModule.forRoot(),
       TabsModule.forRoot(),
       RouterTestingModule,
       HttpClientTestingModule
     ],
     declarations: [RoleDetailsComponent]
   }).compileComponents();
 }));
開發者ID:Yan-waller,項目名稱:ceph,代碼行數:12,代碼來源:role-details.component.spec.ts

示例10: async

 async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       CoreModule,
       SharedModule,
       ToastModule.forRoot(),
       ClusterModule,
       BlockModule
     ],
     declarations: [AppComponent]
   }).compileComponents();
 })
開發者ID:Abhishekvrshny,項目名稱:ceph,代碼行數:13,代碼來源:app.component.spec.ts


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