-
Notifications
You must be signed in to change notification settings - Fork 354
Expand file tree
/
Copy pathauth.module.ts
More file actions
43 lines (38 loc) · 1.3 KB
/
auth.module.ts
File metadata and controls
43 lines (38 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
// third-party modules
import { AngularFireModule, FirebaseAppConfig } from 'angularfire2';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireDatabaseModule } from 'angularfire2/database';
// shared modules
import { SharedModule } from './shared/shared.module';
export const ROUTES: Routes = [
{
path: 'auth',
children: [
{ path: '', pathMatch: 'full', redirectTo: 'login' },
{ path: 'login', loadChildren: './login/login.module#LoginModule' },
{ path: 'register', loadChildren: './register/register.module#RegisterModule' },
]
}
];
export const firebaseConfig: FirebaseAppConfig = {
apiKey: "AIzaSyCXz7GrHLBs-xlsCrr185iG4v4UrNreq2Y",
authDomain: "fitness-app-e668a.firebaseapp.com",
databaseURL: "https://fitness-app-e668a.firebaseio.com",
projectId: "fitness-app-e668a",
storageBucket: "fitness-app-e668a.appspot.com",
messagingSenderId: "1014564696462"
};
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(ROUTES),
AngularFireModule.initializeApp(firebaseConfig),
AngularFireAuthModule,
AngularFireDatabaseModule,
SharedModule.forRoot()
]
})
export class AuthModule {}