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


TypeScript ToasterModule.forRoot方法代碼示例

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


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

示例1: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [ 
        MockComponent
      ],
      imports: [
        RouterTestingModule.withRoutes([
          { path: 'groups', component: MockComponent }
        ]),
        ToasterModule.forRoot()
      ],
      providers: [
        LoginGuard,
        AuthorizationService,
        ToasterService
      ]
    });

    mockRouterStateSnapshot = jasmine.createSpyObj<RouterStateSnapshot>("RouterStateSnapshot", ['toString']);

    location = TestBed.get(Location);

    loginGuard = TestBed.get(LoginGuard);
    authorizationService = TestBed.get(AuthorizationService);
    toasterService = TestBed.get(ToasterService);

    spyOn(toasterService, 'pop');
  });
開發者ID:emmettos,項目名稱:CarraigOgRegister,代碼行數:28,代碼來源:login.guard.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ 
       ManageCoachesComponent,
       CoachPopupComponent
     ],
     imports: [
       HttpClientTestingModule,
       ReactiveFormsModule,
       NgbModule.forRoot(),
       ToasterModule.forRoot(),
       SharedModule
     ],
     providers: [
       CoachesService,
       AuthorizationService,
       ValidationService,
       ToasterService,
       NgbActiveModal
     ],
     schemas: [ 
       NO_ERRORS_SCHEMA 
     ]
   })
   .compileComponents();
 }));
開發者ID:emmettos,項目名稱:CarraigOgRegister,代碼行數:26,代碼來源:manage-coaches.component.spec.ts

示例3: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [ 
        MockComponent
      ],
      imports: [
        HttpClientTestingModule,
        RouterTestingModule.withRoutes([
          { path: 'login', component: MockComponent },
          { path: 'groups', component: MockComponent }
        ]),
        ToasterModule.forRoot()
      ],
      providers: [
        AlertService,
        AuthorizationService,
        ToasterService,
        {
          provide: HTTP_INTERCEPTORS,
          useClass: HttpInterceptorHelper,
          multi: true
        }
      ]
    });

    location = TestBed.get(Location);

    http = TestBed.get(HttpClient);
    httpMock = TestBed.get(HttpTestingController);

    alertService = TestBed.get(AlertService);
    authorizationService = TestBed.get(AuthorizationService);
    toasterService = TestBed.get(ToasterService);
  });
開發者ID:emmettos,項目名稱:CarraigOgRegister,代碼行數:34,代碼來源:http.interceptor.helper.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [
       AppComponent,
       AlertComponent,
       NavComponent
     ],
     imports: [
       RouterTestingModule,
       NgbModule.forRoot(),
       ToasterModule.forRoot()
     ],
     providers: [
       AuthorizationService,
       AlertService
     ]
   }).compileComponents();
 }));
開發者ID:emmettos,項目名稱:CarraigOgRegister,代碼行數:18,代碼來源:app.component.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ 
       MockComponent,
       NavComponent 
     ],
     imports: [
       HttpClientTestingModule,
       RouterTestingModule.withRoutes([
         { path: "login", component: MockComponent }
       ]),
       NgbModule.forRoot(),
       ToasterModule.forRoot()    
     ],
     providers: [
       AuthorizationService,
       ToasterService
     ]
   })
   .compileComponents();
 }));
開發者ID:emmettos,項目名稱:CarraigOgRegister,代碼行數:21,代碼來源:nav.component.spec.ts

示例6:

  AccordionComponent,
  NebularFormInputsComponent,
  NebularSelectComponent,
  CalendarKitFullCalendarShowcaseComponent,
  CalendarKitMonthCellComponent,
];

const SERVICES = [
  NewsService,
];

const MODULES = [
  ThemeModule,
  ExtraComponentsRoutingModule,
  TreeModule,
  ToasterModule.forRoot(),
];

@NgModule({
  imports: [
    ...MODULES,
  ],
  declarations: [
    ...COMPONENTS,
  ],
  providers: [
    ...SERVICES,
  ],
})
export class ExtraComponentsModule { }
開發者ID:akveo,項目名稱:ng2-admin,代碼行數:30,代碼來源:extra-components.module.ts


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