当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript AlertModule.forRoot方法代码示例

本文整理汇总了TypeScript中ngx-bootstrap.AlertModule.forRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AlertModule.forRoot方法的具体用法?TypeScript AlertModule.forRoot怎么用?TypeScript AlertModule.forRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngx-bootstrap.AlertModule的用法示例。


在下文中一共展示了AlertModule.forRoot方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ InfoPanelComponent ],
     imports: [ AlertModule.forRoot() ]
   })
   .compileComponents();
 }));
开发者ID:hzhang-wx,项目名称:ceph,代码行数:7,代码来源:info-panel.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: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       FormsModule,
       AlertModule.forRoot()
     ],
     declarations: [ RegisterComponent ],
     providers: [
       {provide: LoginService, useValue: LoginServiceStub}
     ]
   })
   .compileComponents();
 }));
开发者ID:benwfreed,项目名称:eatlanta-client,代码行数:13,代码来源:register.component.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       SharedModule,
       BsDropdownModule.forRoot(),
       TabsModule.forRoot(),
       AlertModule.forRoot(),
       ComponentsModule,
       RouterTestingModule,
       HttpClientTestingModule
     ],
     declarations: [ PoolDetailComponent ]
   })
   .compileComponents();
 }));
开发者ID:cy-lee,项目名称:ceph,代码行数:15,代码来源:pool-detail.component.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ LoginComponent ],
     imports: [
         FormsModule,
         AlertModule.forRoot(),
         RouterTestingModule,
         StoreModule.provideStore( () => {})
     ],
     providers: [
         {provide: LoginService, useValue: loginServiceStub}
     ]
   })
   .compileComponents();
 }));
开发者ID:benwfreed,项目名称:eatlanta-client,代码行数:15,代码来源:login.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       SharedModule,
       BsDropdownModule.forRoot(),
       TabsModule.forRoot(),
       ModalModule.forRoot(),
       TooltipModule.forRoot(),
       ToastModule.forRoot(),
       AlertModule.forRoot(),
       ComponentsModule,
       RouterTestingModule,
       HttpClientTestingModule
     ],
     declarations: [ RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent ]
   })
   .compileComponents();
 }));
开发者ID:ukernel,项目名称:ceph,代码行数:18,代码来源:rbd-list.component.spec.ts

示例7: describe

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

  configureTestBed({
    declarations: [ViewCacheComponent],
    imports: [AlertModule.forRoot()]
  });

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

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
开发者ID:fghaas,项目名称:ceph,代码行数:19,代码来源:view-cache.component.spec.ts

示例8: describe

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

  configureTestBed({
    declarations: [GrafanaComponent, InfoPanelComponent, LoadingPanelComponent],
    imports: [AlertModule.forRoot(), HttpClientModule, RouterTestingModule],
    providers: [CephReleaseNamePipe, SettingsService, SummaryService]
  });

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

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
开发者ID:dillaman,项目名称:ceph,代码行数:20,代码来源:grafana.component.spec.ts

示例9: describe

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

  class SummaryServiceMock extends SummaryService {
    data: any;

    raiseError() {
      this.summaryDataSource.error(undefined);
    }

    refresh() {
      this.summaryDataSource.next(this.data);
    }
  }

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

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

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

  describe('after ngOnInit', () => {
    let summaryService: SummaryServiceMock;

    beforeEach(() => {
      summaryService = TestBed.get(SummaryService);
      summaryService.data = undefined;
      fixture.detectChanges();
    });

    it('should load images on init', () => {
      spyOn(component, 'loadImages');
      summaryService.data = {};
      summaryService.refresh();
      expect(component.loadImages).toHaveBeenCalled();
    });

    it('should not load images on init because no data', () => {
      spyOn(component, 'loadImages');
      summaryService.refresh();
      expect(component.loadImages).not.toHaveBeenCalled();
    });

    it('should call error function on init when summary service fails', () => {
      spyOn(component.table, 'reset');
      summaryService.raiseError();
      expect(component.table.reset).toHaveBeenCalled();
      expect(component.viewCacheStatusList).toEqual([{ status: ViewCacheStatus.ValueException }]);
    });
  });
});
开发者ID:ShiqiCooperation,项目名称:ceph,代码行数:72,代码来源:rbd-list.component.spec.ts

示例10:

  TypeaheadModule,
  BsDropdownModule,
  ComponentLoaderFactory
} from 'ngx-bootstrap';

import {
  ActionModule,
  NotificationModule,
  CardModule,
  ListModule,
  ToolbarModule,
  PaginationModule,
} from 'patternfly-ng';

const imports = [
  AlertModule.forRoot(),
  CollapseModule.forRoot(),
  ModalModule.forRoot(),
  PopoverModule.forRoot(),
  TabsModule.forRoot(),
  TooltipModule.forRoot(),
  TypeaheadModule.forRoot(),
  BsDropdownModule.forRoot(),
  ActionModule,
  NotificationModule,
  CardModule,
  ListModule,
  ToolbarModule
];

const _exports = [
开发者ID:gnodet,项目名称:syndesis,代码行数:31,代码来源:vendor.module.ts


注:本文中的ngx-bootstrap.AlertModule.forRoot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。