From cb71602a37e063f52e90872930223ce405eb1f67 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Tue, 3 Jul 2018 10:14:57 -0400 Subject: [PATCH] Added formula manager to module --- src/app/app.module.ts | 12 ++++++++---- src/app/formulaManager/app.component.css | 0 ....component.html => formulaManager.component.html} | 0 ...{app.component.ts => formulaManager.component.ts} | 6 ++---- 4 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 src/app/formulaManager/app.component.css rename src/app/formulaManager/{app.component.html => formulaManager.component.html} (100%) rename src/app/formulaManager/{app.component.ts => formulaManager.component.ts} (91%) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1d6d5cc..ae7292f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,10 +11,11 @@ import {ConvertFromGPipe, ConvertToGPipe} from './formulaManager/units.pipe'; import {ScalePipe} from './formulaManager/scale.pipe'; import {AngularMaterialModule} from './material.module'; import {HomeComponent} from './home/home.component'; -import { ServiceWorkerModule } from '@angular/service-worker'; +import {ServiceWorkerModule} from '@angular/service-worker'; +import {FormulaManagerComponent} from './formulaManager/formulaManager.component'; @NgModule({ - declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, HomeComponent, ScalePipe], + declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, FormulaManagerComponent, HomeComponent, ScalePipe], imports: [ AngularMaterialModule, AngularFireModule.initializeApp(environment.firebase), @@ -23,8 +24,11 @@ import { ServiceWorkerModule } from '@angular/service-worker'; BrowserModule, FormsModule, ReactiveFormsModule, - RouterModule.forRoot([{path: '**', component: HomeComponent}]), - ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }) + RouterModule.forRoot([ + {path: 'formulaManager', component: FormulaManagerComponent}, + {path: '**', component: HomeComponent} + ]), + ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}) ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/formulaManager/app.component.css b/src/app/formulaManager/app.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/formulaManager/app.component.html b/src/app/formulaManager/formulaManager.component.html similarity index 100% rename from src/app/formulaManager/app.component.html rename to src/app/formulaManager/formulaManager.component.html diff --git a/src/app/formulaManager/app.component.ts b/src/app/formulaManager/formulaManager.component.ts similarity index 91% rename from src/app/formulaManager/app.component.ts rename to src/app/formulaManager/formulaManager.component.ts index e9a7db9..d439dcf 100644 --- a/src/app/formulaManager/app.component.ts +++ b/src/app/formulaManager/formulaManager.component.ts @@ -1,14 +1,12 @@ import {Component, ElementRef, ViewChildren} from '@angular/core'; import {AngularFirestore} from 'angularfire2/firestore'; -import {share} from 'rxjs/operators'; import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe'; @Component({ selector: 'formula-manager', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] + templateUrl: './formulaManager.component.html' }) -export class AppComponent { +export class FormulaManagerComponent { @ViewChildren('cost') componentCosts: ElementRef[]; formulas;