本文整理匯總了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 }
]
});
}));
示例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();
}));
示例3: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [IonicModule.forRoot(LoaderComponent)],
declarations: [LoaderComponent]
})
.compileComponents();
}));
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MyApp],
providers: [
],
imports: [
IonicModule.forRoot(MyApp)
]
}).compileComponents();
}));
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DaysSelectorComponent],
imports: [
IonicModule.forRoot(DaysSelectorComponent)
],
providers: [
providers.DaysEncodingProvider
]
});
}));
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MyApp],
imports: [
IonicModule.forRoot(MyApp)
],
providers: [
StatusBar,
SplashScreen
]
})
}));
示例7: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
IonicModule.forRoot(AppComponent),
RouterTestingModule,
TranslateModule.forRoot(),
CoreModule
],
declarations: [AppComponent],
providers: []
});
TestBed.compileComponents();
});
示例8: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
IonicModule.forRoot(LoginComponent),
RouterTestingModule,
TranslateModule.forRoot(),
ReactiveFormsModule,
CoreModule
],
declarations: [LoginComponent]
})
.compileComponents();
}));
示例9: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
TranslateModule.forRoot(),
IonicModule.forRoot(ShellComponent),
CoreModule
],
providers: [
{ provide: AuthenticationService, useClass: MockAuthenticationService }
]
})
.compileComponents();
}));
示例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 }]
});
}));