mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 04:43:03 -05:00
refactor: add typing and remove deprecated keycode method
This commit is contained in:
@@ -59,8 +59,8 @@ export class PersonListComponent {
|
||||
|
||||
label = '';
|
||||
|
||||
handleKey(event: any) {
|
||||
if (event.keyCode === 13) {
|
||||
handleKey(event: KeyboardEvent) {
|
||||
if (event.key === 'Enter') {
|
||||
this.names?.unshift(this.label);
|
||||
this.label = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user