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


TypeScript IonicModule.forRoot方法代碼示例

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


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

示例1: beforeEach

    beforeEach(async(() => {


        TestBed.configureTestingModule({
            declarations: [App],
            imports: [
                IonicModule.forRoot(App)
            ],
            providers: [
                EventsBroadcasterProvider,
                VoiceAlertProvider,
                TimerStorageProvider,
                SmartAudioProvider,
                TimerProvider,
                TimerSoundProvider,
                BackgroundModeProvider,
                TtsProvider,
                { provide: StatusBar, useClass: StatusBarMock },
                { provide: SplashScreen, useClass: SplashScreenMock },
                { provide: Platform, useClass: PlatformMock },
                { provide: NativeAudio, useClass: NativeAudioMock },
                { provide: BackgroundMode, useClass: BackgroundModeMock },
                { provide: StorageLocalProvider, useClass: StorageInMemoryProvider },
                // { provide: Events, useClass: EventsMock },
                { provide: TextToSpeech, useClass: TextToSpeechMock }
            ]
        });
    }));
開發者ID:rlasjunies,項目名稱:kct,代碼行數:28,代碼來源:app.component.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [MyApp],
     imports: [
       IonicModule.forRoot(MyApp),
       HttpClientTestingModule,
       TranslateModule.forRoot({
         loader: {
           provide: TranslateLoader,
           useFactory: createTranslateLoader,
           deps: [HttpClient]
         }
       })
     ],
     providers: [
       TranslateService,
       { provide: StatusBar, useClass: StatusBarMock },
       { provide: SplashScreen, useClass: SplashScreenMock },
       { provide: Platform, useClass: PlatformMock },
       { provide: CategoriesService, useClass: CategoriesMock },
       { provide: AnalyticsProvider, useClass: AnalyticsMock },
       { provide: AuthService, useClass: AuthMock },
       { provide: UserProfileService, useClass: UserProfileMock },
       { provide: AuthDataPersistenceService, useClass: AuthDataPersistenceMock },
     ]
   }).compileComponents();
 }));
開發者ID:meumobi,項目名稱:infomobi,代碼行數:27,代碼來源:app.component.spec.ts

示例3: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
       imports: [IonicModule.forRoot(LoaderComponent)],
       declarations: [LoaderComponent]
     })
     .compileComponents();
 }));
開發者ID:firatkaradag,項目名稱:dbcook,代碼行數:7,代碼來源:loader.component.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [MyApp],
     providers: [
     ],
     imports: [
       IonicModule.forRoot(MyApp)
     ]
   }).compileComponents();
 }));
開發者ID:MakersExtia,項目名稱:DispoBox,代碼行數:10,代碼來源:app.component.spec.ts

示例5: beforeEach

    beforeEach(async(() => {

        TestBed.configureTestingModule({
            declarations: [DaysSelectorComponent],
            imports: [
                IonicModule.forRoot(DaysSelectorComponent)
            ],
            providers: [
                providers.DaysEncodingProvider
            ]
        });
    }));
開發者ID:rlasjunies,項目名稱:kct,代碼行數:12,代碼來源:days-selector.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [MyApp],
     imports: [
       IonicModule.forRoot(MyApp)
     ],
     providers: [
       StatusBar,
       SplashScreen
     ]
   })
 }));
開發者ID:Emmanuellut,項目名稱:unit-testing-demo,代碼行數:12,代碼來源:app.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       IonicModule.forRoot(AppComponent),
       RouterTestingModule,
       TranslateModule.forRoot(),
       CoreModule
     ],
     declarations: [AppComponent],
     providers: []
   });
   TestBed.compileComponents();
 });
開發者ID:firatkaradag,項目名稱:dbcook,代碼行數:13,代碼來源:app.component.spec.ts

示例8: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       IonicModule.forRoot(LoginComponent),
       RouterTestingModule,
       TranslateModule.forRoot(),
       ReactiveFormsModule,
       CoreModule
     ],
     declarations: [LoginComponent]
   })
   .compileComponents();
 }));
開發者ID:firatkaradag,項目名稱:dbcook,代碼行數:13,代碼來源:login.component.spec.ts

示例9: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       TranslateModule.forRoot(),
       IonicModule.forRoot(ShellComponent),
       CoreModule
     ],
     providers: [
       { provide: AuthenticationService, useClass: MockAuthenticationService }
     ]
   })
   .compileComponents();
 }));
開發者ID:firatkaradag,項目名稱:dbcook,代碼行數:14,代碼來源:shell.component.spec.ts

示例10: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [CopayApp],
     schemas: [NO_ERRORS_SCHEMA],
     imports: [
       IonicModule.forRoot(CopayApp),
       ProvidersModule,
       HttpClientTestingModule,
       TranslateModule.forRoot({
         loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
       })
     ],
     providers: [{ provide: Logger, useClass: LoggerMock }]
   });
 }));
開發者ID:cmgustavo,項目名稱:copay,代碼行數:15,代碼來源:app.component.spec.ts


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