Added formula manager to module

This commit is contained in:
Zakary Timson 2018-07-03 10:14:57 -04:00
parent fb459928c4
commit cb71602a37
4 changed files with 10 additions and 8 deletions

View File

@ -11,10 +11,11 @@ import {ConvertFromGPipe, ConvertToGPipe} from './formulaManager/units.pipe';
import {ScalePipe} from './formulaManager/scale.pipe'; import {ScalePipe} from './formulaManager/scale.pipe';
import {AngularMaterialModule} from './material.module'; import {AngularMaterialModule} from './material.module';
import {HomeComponent} from './home/home.component'; 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({ @NgModule({
declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, HomeComponent, ScalePipe], declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, FormulaManagerComponent, HomeComponent, ScalePipe],
imports: [ imports: [
AngularMaterialModule, AngularMaterialModule,
AngularFireModule.initializeApp(environment.firebase), AngularFireModule.initializeApp(environment.firebase),
@ -23,8 +24,11 @@ import { ServiceWorkerModule } from '@angular/service-worker';
BrowserModule, BrowserModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule.forRoot([{path: '**', component: HomeComponent}]), RouterModule.forRoot([
ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }) {path: 'formulaManager', component: FormulaManagerComponent},
{path: '**', component: HomeComponent}
]),
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production})
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]

View File

@ -1,14 +1,12 @@
import {Component, ElementRef, ViewChildren} from '@angular/core'; import {Component, ElementRef, ViewChildren} from '@angular/core';
import {AngularFirestore} from 'angularfire2/firestore'; import {AngularFirestore} from 'angularfire2/firestore';
import {share} from 'rxjs/operators';
import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe'; import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe';
@Component({ @Component({
selector: 'formula-manager', selector: 'formula-manager',
templateUrl: './app.component.html', templateUrl: './formulaManager.component.html'
styleUrls: ['./app.component.css']
}) })
export class AppComponent { export class FormulaManagerComponent {
@ViewChildren('cost') componentCosts: ElementRef[]; @ViewChildren('cost') componentCosts: ElementRef[];
formulas; formulas;