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


TypeScript ngx-toastr.ToastrModule類代碼示例

本文整理匯總了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();
	}));
開發者ID:iadgov,項目名稱:WALKOFF,代碼行數:33,代碼來源:devices.component.spec.ts

示例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();
 }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:28,代碼來源:storage-form.dialog.component.spec.ts

示例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();
 }));
開發者ID:systers,項目名稱:PC-Prep-Kit,代碼行數:32,代碼來源:pcpolicy.component.spec.ts

示例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();
 }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:33,代碼來源:manage-repository.component.spec.ts

示例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();
  }));
開發者ID:systers,項目名稱:PC-Prep-Kit,代碼行數:28,代碼來源:activity-3.component.spec.ts

示例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);
    }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:30,代碼來源:error.interceptor.spec.ts

示例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();
 }));
開發者ID:systers,項目名稱:PC-Prep-Kit,代碼行數:27,代碼來源:activity-2.component.spec.ts

示例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();
	}));
開發者ID:iadgov,項目名稱:WALKOFF,代碼行數:27,代碼來源:execution.component.spec.ts

示例9: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [NgbModule, BlockUIModule.forRoot(), ToastrModule.forRoot(), BrowserAnimationsModule],
     declarations: [ProjectsComponent, ProjectPeriodPipe],
     providers: [projectServiceProviderMock(), ToastrService],
   }).compileComponents();
 }));
開發者ID:fischermatte,項目名稱:geolud,代碼行數:7,代碼來源:projects.component.spec.ts

示例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();
 }));
開發者ID:systers,項目名稱:PC-Prep-Kit,代碼行數:9,代碼來源:activity-3.component.spec.ts


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