import { Component } from '@angular/core' ; import { MessageService } from '../_services/index' ; @ Component ( { moduleId : module . id , templateUrl : 'home.component.html' } ) export class HomeComponent { constructor ( private messageService ) { } sendMessage ( ) { this . messageService . sendMessage ( 'Message from Home Component to App Component!' ) ; } clearMessage ( ) { this . messageService . clearMessage ( ) ; } }