import 'hammerjs' ; import { NgModule } from '@angular/core' ; import { FormsModule } from '@angular/forms' ; import { HttpModule } from '@angular/http' ; import { MaterialModule } from '@angular/material' ; import { MdIconRegistry } from '@angular/material' ; import { BrowserModule , DomSanitizer } from '@angular/platform-browser' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { RouterModule , Routes } from '@angular/router' ; import { CredentialStoreService } from '../credential_store/credential_store.service' ; import { ManageStoreComponent } from '../manage_store/manage_store.component' ; import { OpenYoloProviderComponent } from '../openyolo_provider/openyolo_provider.component' ; import { AppComponent } from './app.component' ; const appRoutes = [ { path : 'openyolo-provider' , component : OpenYoloProviderComponent } , { path : '' , component : ManageStoreComponent } ] ; @ NgModule ( { declarations : [ AppComponent , OpenYoloProviderComponent , ManageStoreComponent ] , imports : [ BrowserAnimationsModule , BrowserModule , FormsModule , HttpModule , MaterialModule , RouterModule . forRoot ( appRoutes ) ] , providers : [ CredentialStoreService ] , bootstrap : [ AppComponent ] } ) export class AppModule { constructor ( iconRegistry , sanitizer ) { const addIcon = ( name ) => { iconRegistry . addSvgIcon ( name , sanitizer . bypassSecurityTrustResourceUrl ( `assets/${ name }.svg` ) ) ; } ; const addIcons = ( ... names ) => names . forEach ( addIcon ) ; addIcons ( 'barbican' , 'continue' , 'edit' , 'email_account' , 'generic_account' , 'phone_account' ) ; } }