import { Component } from '@angular/core' ; import { AlertService } from '../_services/index' ; @ Component ( { moduleId : module . id , templateUrl : 'home.component.html' } ) export class HomeComponent { constructor ( private alertService ) { } success ( message ) { this . alertService . success ( message ) ; } error ( message ) { this . alertService . error ( message ) ; } info ( message ) { this . alertService . info ( message ) ; } warn ( message ) { this . alertService . warn ( message ) ; } clear ( ) { this . alertService . clear ( ) ; } }