Change event not working

i stored a password in local storage and if i type the same password in text box without click event i want to move inside my app.
am trying (change) event but its not working exactly

<input class=“txtinput” [(ngModel)]=“operation” (change)=“openpage(value)”>

openpage(value: any){
this.operation = value;
if(value == window.localStorage.getItem(‘code’)){

*****confirm me atleast if it is possible r not
help me out