本文整理匯總了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');
});
示例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();
}));
示例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);
});
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent,
AlertComponent,
NavComponent
],
imports: [
RouterTestingModule,
NgbModule.forRoot(),
ToasterModule.forRoot()
],
providers: [
AuthorizationService,
AlertService
]
}).compileComponents();
}));
示例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();
}));
示例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 { }