当输入参数被更改时,我想执行一些操作。假设我有一个DatePicker组件,它有一个type输入变量,当类型被更改时,我想使用另一个date变量执行一些操作。怎么做?export class DatePicker {
date: Date;
dateChange = new EventEmitter();
set type(type: string) {
if (type === "tod
我正在尝试在ngModel上检测到<select>标记中的更改。在角1.x中,我们可以在ngModel上使用ngModel或者通过使用ngChange来解决这个问题,但是我还没有理解如何检测到ngModel在角2中的变化。完整示例:import {FORM_DIRECTIVES} from 'angular2{{option