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