本文整理汇总了TypeScript中ngx-toastr.ToastrModule类的典型用法代码示例。如果您正苦于以下问题:TypeScript ToastrModule类的具体用法?TypeScript ToastrModule怎么用?TypeScript ToastrModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ToastrModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpModule,
NgbModule.forRoot(),
NgxDatatableModule,
JwtModule.forRoot({
config: {
tokenGetter: jwtTokenGetter,
blacklistedRoutes: ['/login', '/api/auth', '/api/auth/logout', '/api/auth/refresh']
}
}),
ToastrModule.forRoot({ positionClass: 'toast-bottom-right' })
// FormsModule,
// ReactiveFormsModule,
],
declarations: [DevicesComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [DevicesService, JwtInterceptor,
// Providing JwtInterceptor allow to inject JwtInterceptor manually into RefreshTokenInterceptor
{
provide: HTTP_INTERCEPTORS,
useExisting: JwtInterceptor,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useClass: RefreshTokenInterceptor,
multi: true
}],
})
.compileComponents();
}));
示例2: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
RouterTestingModule,
MaterialModule,
FormsModule,
FormHelperModule,
ReactiveFormsModule,
HttpClientTestingModule,
NgxsModule.forRoot([AppState, BrowseStoragesState]),
ToastrModule.forRoot()
],
providers: [
StorageManagerService,
{provide: MAT_DIALOG_DATA, useValue: {}},
{
provide: MatDialogRef, useValue: {
afterClosed: () => of(null),
backdropClick: () => of(null),
close: () => of(null),
updateSize: () => of(null)
}
}
],
declarations: [StorageFormDialogComponent]
}).compileComponents();
}));
示例3: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpClientModule,
RouterTestingModule,
BrowserAnimationsModule,
MaterialModule,
ToastrModule.forRoot()
],
declarations: [
PcpolicyComponent,
HeaderComponent,
NavbarComponent,
InfokitComponent,
ButtonNavComponent
],
providers: [
DashboardService,
APIService,
AuthService,
NavbarService,
LanguageService,
ToastrService,
InfokitService,
SharedDataService,
BadgeService,
NotifyService,
LeaderBoardService
]
})
.compileComponents();
}));
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
BrowserModule,
RouterTestingModule,
DragDropModule,
MaterialModule,
FormsModule,
FormHelperModule,
LayoutModule,
ReactiveFormsModule,
HttpClientTestingModule,
NgxsModule.forRoot([AppState, SessionState]),
NgxsFormPluginModule,
NgProgressModule,
NgProgressHttpModule,
NoopAnimationsModule,
ToastrModule.forRoot(),
],
providers: [
{
provide: ActivatedRoute,
useValue: {
paramMap: of(convertToParamMap({
storageId: 'storage-id',
type: RepositoryTypeEnum.HOSTED.toLowerCase()
}))
}
}
],
declarations: [ManageRepositoryComponent]
}).compileComponents();
}));
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PicturePuzzleComponent,
ButtonNavComponent, LevelNavigateComponent],
imports: [
RouterTestingModule,
HttpClientModule,
ToastrModule.forRoot(),
OverlayModule,
MaterialModule
],
providers: [
SharedDataService,
DashboardService,
APIService,
LanguageService,
ToastrService,
PerformanceDisplayService,
MatDialog,
ToastrService,
NotifyService,
BadgeService,
LeaderBoardService
]
})
.compileComponents();
}));
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule,
BrowserAnimationsModule,
MaterialModule,
NgxsModule.forRoot([SessionState]),
NgxsFormPluginModule.forRoot(),
ToastrModule.forRoot(),
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptor,
multi: true,
}
]
});
interceptor = TestBed.get(ErrorInterceptor);
toastr = TestBed.get(ToastrService);
toastrSpy = spyOn(toastr, 'error').and.callThrough();
backend = TestBed.get(HttpTestingController);
client = TestBed.get(HttpClient);
store = TestBed.get(Store);
actions = TestBed.get(Actions);
}));
示例7: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
HttpClientModule,
ToastrModule.forRoot(),
OverlayModule,
MaterialModule
],
declarations: [MemoryGameComponent,
ButtonNavComponent, LevelNavigateComponent],
providers: [
DashboardService,
APIService,
AuthService,
SharedDataService,
LanguageService,
ToastrService,
PerformanceDisplayService,
MatDialog,
NotifyService,
BadgeService,
LeaderBoardService,
{provide: ActivatedRoute, useValue: {params: Observable.of({level: MOCK_LEVEL})}}
]
}).compileComponents();
}));
示例8: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpModule,
// NgbModule.forRoot(),
NgxDatatableModule,
ToastrModule.forRoot({ positionClass: 'toast-bottom-right' }),
// FormsModule,
// ReactiveFormsModule,
],
declarations: [ExecutionComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [ExecutionService, JwtInterceptor,
// Providing JwtInterceptor allow to inject JwtInterceptor manually into RefreshTokenInterceptor
{
provide: HTTP_INTERCEPTORS,
useExisting: JwtInterceptor,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useClass: RefreshTokenInterceptor,
multi: true
}],
})
.compileComponents();
}));
示例9: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgbModule, BlockUIModule.forRoot(), ToastrModule.forRoot(), BrowserAnimationsModule],
declarations: [ProjectsComponent, ProjectPeriodPipe],
providers: [projectServiceProviderMock(), ToastrService],
}).compileComponents();
}));
示例10: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DoctorchatComponent, ButtonNavComponent],
imports: [FormsModule, ToastrModule.forRoot(), RouterTestingModule, OverlayModule],
providers: [DoctorService, APIService, HttpClient, HttpHandler, SharedDataService, DashboardService, ToastrService, InfokitService, LanguageService,
PerformanceDisplayService, MatDialog, BotService]
})
.compileComponents();
}));