I was trying to test the two way binding of Angular2 but I'm always getting this
error: Can't bind to 'ngModel' since it isn't a known property of 'input'.
How can I solve this ?
import { Component } from '@angular/core';
@Component({
  selector: 'impure-pipe',
  template: `<input type="text" [(ngModel)]='a'> <p>{{ a| calcPipe:b}}</p>`
})
export class PipesAppComponent {
  a: number = 2;
  b: number = 2;
}
 
     
     
    