by use keyup event in angular not working code example
Example: how to bind the value of keyup event in runtime to a variable
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
sampleString: string;
updateBox(e) {
this.sampleString = e.target.value;
}
}
{{box.value}}
This is sampleString Value: {{sampleString}}