I want to call showmodel(displayType)
from another compoent.How to call header component function to another component?
header.compoent.ts
As Angular 2 is based on components and component interaction, it is important to understand how data is passed from one component to another. Data is passed between components using property bindings. Take a look at the syntax below:
value is a property of current component and user is a property for access another component
you should use to @Input property
import {Component, Input} from 'angular2/angular2'
export Class exampleComponent{
@Input() user: any ;
}