本文整理匯總了TypeScript中ngx-toastr.ToastrModule.forRoot方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ToastrModule.forRoot方法的具體用法?TypeScript ToastrModule.forRoot怎麽用?TypeScript ToastrModule.forRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ngx-toastr.ToastrModule
的用法示例。
在下文中一共展示了ToastrModule.forRoot方法的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();
}));