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


TypeScript ngx-bootstrap.AlertModule類代碼示例

本文整理匯總了TypeScript中ngx-bootstrap.AlertModule的典型用法代碼示例。如果您正苦於以下問題:TypeScript AlertModule類的具體用法?TypeScript AlertModule怎麽用?TypeScript AlertModule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了AlertModule類的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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。