2018-06-25 11:19:17 -04:00
|
|
|
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';
|
2018-06-25 11:19:17 -04:00
|
|
|
import {NgModule} from '@angular/core';
|
2018-06-25 00:50:47 -04:00
|
|
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
2018-06-25 11:19:17 -04:00
|
|
|
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';
|
2018-06-25 11:19:17 -04:00
|
|
|
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';
|
2018-07-10 18:34:35 -04:00
|
|
|
import {NgxElectronModule} from 'ngx-electron';
|
2018-07-12 16:58:00 -04:00
|
|
|
import {AboutComponent} from './about/about.component';
|
2018-07-24 19:47:45 -04:00
|
|
|
import {CategoriesComponent} from './store/categories.component';
|
2018-07-12 16:58:00 -04:00
|
|
|
import {AngularFireStorageModule} from 'angularfire2/storage';
|
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 14:14:38 -04:00
|
|
|
import {NewProductComponent} from './store/newProduct/newProduct.component';
|
2018-07-17 20:43:26 -04:00
|
|
|
import {DeleteComponent} from './delete/delete.component';
|
2018-07-15 14:54:09 -04:00
|
|
|
import {ProductsComponent} from './store/products/products.component';
|
2018-07-19 21:43:19 -04:00
|
|
|
import {CartComponent} from './store/cart/cart.component';
|
2018-07-22 13:22:48 -04:00
|
|
|
import {ViewComponents} from './formulaManager/viewComponents/viewComponents.component';
|
2018-07-22 14:21:25 -04:00
|
|
|
import {NewComponentComponent} from './formulaManager/newComponent/newComponent.component';
|
2018-07-22 19:52:58 -04:00
|
|
|
import {HttpModule} from '@angular/http';
|
2018-07-24 19:47:45 -04:00
|
|
|
import {NewFormulaComponent} from './formulaManager/newFormula/newFormula.component';
|
|
|
|
import {AppStore} from './app.store';
|
2018-08-08 01:15:29 -04:00
|
|
|
import {SlideshowModule} from 'ng-simple-slideshow';
|
2018-06-24 21:11:31 -04:00
|
|
|
|
|
|
|
@NgModule({
|
2018-07-12 16:58:00 -04:00
|
|
|
declarations: [
|
2018-07-22 13:22:48 -04:00
|
|
|
AboutComponent,
|
2018-07-12 16:58:00 -04:00
|
|
|
AppComponent,
|
|
|
|
CategoriesComponent,
|
2018-07-19 21:43:19 -04:00
|
|
|
CartComponent,
|
2018-07-12 16:58:00 -04:00
|
|
|
ConvertFromGPipe,
|
|
|
|
ConvertToGPipe,
|
2018-07-15 14:34:57 -04:00
|
|
|
DeleteComponent,
|
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-22 14:21:25 -04:00
|
|
|
NewComponentComponent,
|
2018-07-24 19:47:45 -04:00
|
|
|
NewFormulaComponent,
|
2018-07-15 14:14:38 -04:00
|
|
|
NewProductComponent,
|
2018-07-15 14:54:09 -04:00
|
|
|
ProductsComponent,
|
2018-07-12 16:58:00 -04:00
|
|
|
ScalePipe,
|
2018-07-22 13:22:48 -04:00
|
|
|
ViewComponents
|
2018-07-12 16:58:00 -04:00
|
|
|
],
|
2018-06-24 21:11:31 -04:00
|
|
|
imports: [
|
2018-06-25 11:19:17 -04:00
|
|
|
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,
|
2018-07-22 19:52:58 -04:00
|
|
|
HttpModule,
|
2018-07-10 18:34:35 -04:00
|
|
|
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-19 21:43:19 -04:00
|
|
|
{path: 'cart', component: CartComponent},
|
2018-07-12 16:58:00 -04:00
|
|
|
{path: 'formulaManager', component: FormulaManagerComponent},
|
2018-07-15 14:54:09 -04:00
|
|
|
{path: 'products/:product', component: ProductsComponent},
|
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}
|
|
|
|
]),
|
2018-08-08 01:15:29 -04:00
|
|
|
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}),
|
|
|
|
SlideshowModule
|
2018-06-24 21:11:31 -04:00
|
|
|
],
|
2018-07-24 19:47:45 -04:00
|
|
|
providers: [AppStore],
|
2018-07-22 14:21:25 -04:00
|
|
|
entryComponents: [
|
|
|
|
DeleteComponent,
|
|
|
|
LoginComponent,
|
|
|
|
NewCategoryComponent,
|
|
|
|
NewComponentComponent,
|
2018-07-24 19:47:45 -04:00
|
|
|
NewFormulaComponent,
|
2018-07-22 14:21:25 -04:00
|
|
|
NewProductComponent,
|
|
|
|
ViewComponents
|
|
|
|
],
|
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();
|
|
|
|
}
|
|
|
|
}
|