What kind of change
event, under what conditions does it arise and how can it be used?
That is, what did I subscribe to in the following example via (change)="update()"
?
http://plnkr.co/edit/mfoToOSLU6IU2zr0A8OB?p=preview
import {Component, View, Input, Output, EventEmitter, OnChanges} from '@angular/core' @Component({ selector: 'inner-component', template: ` <label><input type="checkbox" [(ngModel)]="data.isSelected"> Selected</label> ` }) export class InnerComponent { data = { isSelected: false }; } @Component({ selector: 'my-app', template: ` <p><inner-component (change)="update()"></inner-component></p> <p>The component was updated {{count}} times</p> `, directives: [InnerComponent] }) export class AppComponent { count = 0; update() { ++this.count; } }