website/src/app/app.module.ts

69 lines
2.7 KiB
TypeScript
Raw Normal View History

import {BrowserModule} from '@angular/platform-browser';
2018-06-25 00:50:47 -04:00
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
2018-07-03 10:10:47 -04:00
import {RouterModule} from '@angular/router';
2018-06-25 00:50:47 -04:00
import {AngularFireModule} from 'angularfire2';
2018-07-15 12:38:11 -04:00
import {AngularFirestoreModule, AngularFirestore} from 'angularfire2/firestore';
import {NgModule} from '@angular/core';
2018-06-25 00:50:47 -04:00
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {AppComponent} from './app.component';
2018-07-03 10:10:47 -04:00
import {environment} from '../environments/environment';
import {ConvertFromGPipe, ConvertToGPipe} from './formulaManager/units.pipe';
import {ScalePipe} from './formulaManager/scale.pipe';
import {AngularMaterialModule} from './material.module';
2018-07-03 10:10:47 -04:00
import {HomeComponent} from './home/home.component';
2018-07-03 10:14:57 -04:00
import {ServiceWorkerModule} from '@angular/service-worker';
import {FormulaManagerComponent} from './formulaManager/formulaManager.component';
import {NgxElectronModule} from 'ngx-electron';
2018-07-12 16:58:00 -04:00
import {AboutComponent} from './about/about.component';
import {CategoriesComponent} from './store/categories.component';
import {AngularFireStorageModule} from 'angularfire2/storage';
2018-07-14 13:03:31 -04:00
import {BreadcrumbService} from './store/breadcrumb.service';
2018-07-14 17:59:45 -04:00
import {LoginComponent} from './login/login.component';
import {AngularFireAuthModule} from 'angularfire2/auth';
2018-07-14 19:20:38 -04:00
import {NewCategoryComponent} from './store/newCategory/newCategory.component';
2018-07-15 13:31:58 -04:00
import {DeleteCategoryComponent} from './store/deleteCategory/deleteCategory.component';
2018-06-24 21:11:31 -04:00
@NgModule({
2018-07-12 16:58:00 -04:00
declarations: [
AppComponent,
CategoriesComponent,
ConvertFromGPipe,
ConvertToGPipe,
2018-07-15 13:31:58 -04:00
DeleteCategoryComponent,
2018-07-12 16:58:00 -04:00
FormulaManagerComponent,
HomeComponent,
2018-07-14 17:59:45 -04:00
LoginComponent,
2018-07-14 19:20:38 -04:00
NewCategoryComponent,
2018-07-12 16:58:00 -04:00
ScalePipe,
AboutComponent
],
2018-06-24 21:11:31 -04:00
imports: [
AngularMaterialModule,
2018-07-14 17:59:45 -04:00
AngularFireAuthModule,
2018-06-25 00:50:47 -04:00
AngularFireModule.initializeApp(environment.firebase),
AngularFirestoreModule,
2018-07-12 16:58:00 -04:00
AngularFireStorageModule,
2018-06-25 00:50:47 -04:00
BrowserAnimationsModule,
BrowserModule,
FormsModule,
NgxElectronModule,
2018-07-03 10:10:47 -04:00
ReactiveFormsModule,
2018-07-03 10:14:57 -04:00
RouterModule.forRoot([
2018-07-11 22:28:15 -04:00
{path: 'about', component: AboutComponent},
2018-07-12 16:58:00 -04:00
{path: 'formulaManager', component: FormulaManagerComponent},
2018-07-14 12:42:49 -04:00
{path: 'store/:category', component: CategoriesComponent},
2018-07-12 16:58:00 -04:00
{path: 'store', component: CategoriesComponent},
2018-07-03 10:14:57 -04:00
{path: '**', component: HomeComponent}
]),
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production})
2018-06-24 21:11:31 -04:00
],
2018-07-14 13:03:31 -04:00
providers: [BreadcrumbService],
2018-07-15 13:31:58 -04:00
entryComponents: [DeleteCategoryComponent, LoginComponent, NewCategoryComponent],
2018-06-24 21:11:31 -04:00
bootstrap: [AppComponent]
})
2018-07-15 12:38:11 -04:00
export class AppModule {
constructor(private db: AngularFirestore) {
this.db.firestore.enablePersistence();
}
}