-
Notifications
You must be signed in to change notification settings - Fork 14
/
app.module.ts
59 lines (57 loc) · 2.3 KB
/
app.module.ts
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularFireModule } from '@angular/fire';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgMaterialModule } from './ng-material/ng-material.module';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
import { NgxPaginationModule } from 'ngx-pagination';
import { AppComponent } from './app.component';
import { environment } from 'src/environments/environment';
import { NavBarComponent } from './components/nav-bar/nav-bar.component';
import { HomeComponent } from './components/home/home.component';
import { BlogEditorComponent } from './components/blog-editor/blog-editor.component';
import { BlogCardComponent } from './components/blog-card/blog-card.component';
import { ExcerptPipe } from './custompipes/excerpt.pipe';
import { SlugPipe } from './custompipes/slug.pipe';
import { BlogComponent } from './components/blog/blog.component';
import { PaginatorComponent } from './components/paginator/paginator.component';
import { AuthGuard } from './guards/auth.guard';
@NgModule({
declarations: [
AppComponent,
NavBarComponent,
HomeComponent,
BlogEditorComponent,
BlogCardComponent,
ExcerptPipe,
SlugPipe,
BlogComponent,
PaginatorComponent,
],
imports: [
NgxPaginationModule,
AngularFireAuthModule,
BrowserModule,
CKEditorModule,
FormsModule,
NgMaterialModule,
BrowserAnimationsModule,
AngularFireModule.initializeApp(environment.firebaseConfig),
AngularFirestoreModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'page/:pagenum', component: HomeComponent },
{ path: 'addpost', component: BlogEditorComponent, canActivate: [AuthGuard] },
{ path: 'editpost/:id', component: BlogEditorComponent, canActivate: [AuthGuard] },
{ path: 'blog/:id/:slug', component: BlogComponent },
{ path: '**', component: HomeComponent }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }