EventEmitter in shared service's constructor doens't emit data
问题 I have a HomeCmp and Shared Service . Look at the shared service 's constructor. I have manually set 'Guest' string and trying to emit UserModel object . But it doesn't receive object in HomeCmp 's ngOnInit . If you click the button, it will work. any suggestion? How can I show Guest string when I run the app through EventEmitter . service.ts import {EventEmitter} from 'angular2/core'; import {UserModel} from 'app/models'; export class NavService { user:EventEmitter<UserModel>=new