I wanted to extend the app from [Angular2's Tutorial][1] by having a grandchild component , power-select, called from the HeroDetailComponent:
selector: 'my-hero-detail',
template: `
<div *ngIf="hero">
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input [(ngModel)]="hero.name" placeholder="name"/>
<power-select [(power)]="hero.power"></power-select>
</div>
</div>
`,
directives: [PowerSelectComponent],
inputs: ['hero']
When I pass in the hero.power as an object, changes get reflected to the parent/grandparent.
http://plnkr.co/edit/UfMStWU5fEywvovpSIg1?p=preview
However if I try to pass hero.power as a string the changes do not get reflected unless I use an @Ouput eventemitter.
http://plnkr.co/edit/p9YcfGudIgSbGPp1xrlw?p=preview (provided by: zoechi)
The question is, why do I need the @Output eventemitter when I pass a string and not when I pass an object?