import 'hammerjs' ; import { NgModule } from '@angular/core' ; import { FormsModule , ReactiveFormsModule } from '@angular/forms' ; import { HttpModule } from '@angular/http' ; import { MaterialModule } from '@angular/material' ; import { MdIconRegistry } from '@angular/material' ; import { BrowserModule } from '@angular/platform-browser' ; import { DomSanitizer } from '@angular/platform-browser' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { HintComponent } from '../hint/hint.component' ; import { RetrieveComponent } from '../retrieve/retrieve.component' ; import { SaveComponent } from '../save/save.component' ; import { SettingsComponent } from '../settings/settings.component' ; import { AppComponent } from './app.component' ; import { SettingsService } from './settings.service' ; @ NgModule ( { declarations : [ AppComponent , HintComponent , RetrieveComponent , SaveComponent , SettingsComponent ] , entryComponents : [ SettingsComponent ] , imports : [ BrowserAnimationsModule , BrowserModule , FormsModule , ReactiveFormsModule , HttpModule , MaterialModule , ] , providers : [ SettingsService ] , 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 ( 'facebook' , 'google' , 'microsoft' , 'password' , 'settings' ) ; } }