Question: I want to check whether the input is empty.

* If not empty, enable the submit button.
* If empty, disable the submit
button.

I tried `(oninput)` and `(onchange)`, but they do not run.

```
<input type="password" [(ngModel)]="myPassword" (oninput)="checkPasswordEmpty()"/>

checkPasswordEmpty() {
    console.log("checkPasswordEmpty runs");
    if (this.myPassword) {
        // enable the button
    }
}

```

Answer: 
To bind functions to events, you don't have to prefix them with `on`. Just place the event.

For example, if you want to handle the `keydown` ([plunker demo](http://plnkr.co/edit/KImV8Fmp2nxGui5YMVW9?p=preview)):

```
<input type="password" [(ngModel)]="myPassword" (keydown)="checkPasswordEmpty($event)"/>

```

---

But in your specific case, since you already are using `ngModel` you are better off using `(ngModelChange)`:

```
<input type="password" [(ngModel)]="myPassword" (ngModelChange)="checkPasswordEmpty()"/>

```

Because it will pick up the changes when the user pastes (via `CTRL+V` or`mouse right click menu -> Paste`) the password instead of typing it.

See **[plunker demo for using `(ngModelChange)` here](http://plnkr.co/edit/magIInr47xySxFkMFKxk?p=preview)**.
When using the template-driven approach suggested by @Thierry Templier, the form object also has an `invalid` property.

So instead of: 

```
<button [disabled]="!formCtrl.form.valid">Some button</button>

```

You can also use:

```
<button [disabled]="formCtrl.form.invalid">Some button</button>

```

It's a small difference, but overall cleaner syntax in my opinion.