Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
@NgModule({
declarations: [
AppComponent
],
imports: [
// Add .withServerTransition() to support Universal rendering.
// The application ID can be any identifier which is unique on
// the page.
BrowserModule.withServerTransition({appId: 'ngx-auth-firebaseui'}),
Angulartics2Module.forRoot(),
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}),
AngularFireModule.initializeApp(firebaseKey),
NgxAuthFirebaseUIModule.forRoot(firebaseKey, firebaseAppNameFactory,
{
enableFirestoreSync: true,
toastMessageOnAuthSuccess: true,
toastMessageOnAuthError: true,
authGuardFallbackURL: 'examples/logged-out',
authGuardLoggedInURL: 'examples/logged-in',
}),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
}
}),
HighlightModule.forRoot({
StoreModule.forRoot(reducers, {metaReducers}),
StoreDevtoolsModule.instrument({
maxAge: 15, // Retains last n states
logOnly: environment.production, // Restrict extension to log-onlAy mode
}),
EffectsModule.forRoot(effects),
RouterModule.forRoot(
[
{path: '', component: HomePage},
{
path: ':org/:name',
loadChildren: () => import('./repository/repository.module').then(m => m.RepositoryModule),
},
],
{preloadingStrategy: PreloadAllModules}),
CAN_AUTH ? [AngularFireModule.initializeApp(FIREBASE_CONFIG), AngularFireAuthModule] : [],
],
providers: [MatIconRegistry],
bootstrap: [App]
})
export class AppModule {
}
HomePage,
LoginPage,
SignupPage,
ProfilePage,
SettingsPage,
GroupPage,
LeaderboardPage,
LogoutPage,
CameraPage,
],
imports: [
BrowserModule,
// HttpClientModule,
IonicModule.forRoot(MyApp),
AngularFireModule.initializeApp(firebaseAuth),
AngularFireAuthModule,
AngularFireStorageModule,
BrowserAnimationsModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
LoginPage,
SignupPage,
ProfilePage,
SettingsPage,
LeaderboardPage,
GroupPage,
// firebase
import Config from './firebase';
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { AngularFireStorageModule } from '@angular/fire/storage';
import { AngularFirestoreModule } from '@angular/fire/firestore';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
AngularFireModule.initializeApp(Config),
AngularFireAuthModule,
AngularFireAuthModule,
AngularFirestoreModule,
AngularFireStorageModule
],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule { }
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AngularFireModule.initializeApp(COMMON_CONFIG),
AngularFireFunctionsModule
],
providers: [
{ provide: FirebaseNameOrConfigToken, useValue: FIREBASE_APP_NAME_TOO },
{ provide: FirebaseOptionsToken, useValue: COMMON_CONFIG },
{ provide: FUNCTIONS_ORIGIN, useValue: 'http://0.0.0.0:9999' },
{ provide: FUNCTIONS_REGION, useValue: 'asia-northeast1' }
]
});
inject([FirebaseApp, AngularFireFunctions], (app_: FirebaseApp, _fns: AngularFireFunctions) => {
app = app_;
afFns = _fns;
})();
});
CreateClaimerComponent,
EmbedComponent,
PrivacyPolicyComponent
],
imports: [
BrowserModule,
FormsModule,
AngularFontAwesomeModule,
AppRoutingModule,
SweetAlert2Module.forRoot(),
NgxWebstorageModule.forRoot(),
BsDropdownModule.forRoot(),
TooltipModule.forRoot(),
AlertModule.forRoot(),
AceModule,
AngularFireModule.initializeApp(environment.firebase),
AngularFireDatabaseModule,
AngularFireAuthModule
],
providers: [
AuthService,
CurrentProjectService,
TitleService
],
bootstrap: [AppComponent]
})
export class AppModule { }
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AngularFireModule.initializeApp(COMMON_CONFIG),
AngularFirestoreModule.enablePersistence({synchronizeTabs: true})
]
});
inject([FirebaseApp, AngularFirestore], (_app: FirebaseApp, _afs: AngularFirestore) => {
app = _app;
afs = _afs;
})();
});
import { AngularFireStorageModule } from '@angular/fire/storage';
import { environment } from '../environments/environment';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
ComponentsModule,
ServicesModule,
HttpClientModule,
AngularFireModule.initializeApp(environment.firebaseConfig),
AngularFirestoreModule.enablePersistence(),
AngularFireAuthModule,
AngularFireStorageModule,
],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule {}
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
AngularFireAuthModule,
AngularFireModule.initializeApp(firebaseConfig),
AngularFirestoreModule,
MatIconModule,
MatProgressSpinnerModule,
MatSnackBarModule,
MatTooltipModule,
RouterTestingModule,
LazyLoadImageModule,
HttpClientTestingModule,
TranslateModule.forRoot({
loader: {provide: TranslateLoader, useClass: FakeLoader},
})
],
declarations: [ MovieListComponent ],
providers: [
AuthService,
AngularFireAuthModule,
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AngularFireModule.initializeApp(COMMON_CONFIG),
AngularFirestoreModule.enablePersistence({synchronizeTabs: true})
]
});
inject([FirebaseApp, AngularFirestore], (_app: FirebaseApp, _afs: AngularFirestore) => {
app = _app;
afs = _afs;
})();
});