how do you count characters including space in keyup event in angular 6?
import { Component } from '@angular/core';
@Component({
selector: 'app-loop-back',
template: `
<input #box (keyup)="0">
<p>{{box.value}}</p>
`
})
export class LoopbackComponent { }
You can count character by
box.value.length
or
box.value?.length
? after the property will check for undefined..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With