How to make walking the list li by pressing key down/up?

There is a list of ul elements.

How to highlight list element by clicking on the up/down keys? Roughly speaking, to allocate items?

Tried to create a reference to the DOM element:

@ViewChild("SearchList", { static: false }) searchResultList: ElementRef;


On how-Tonino navesti wiretap events keydn
April 7th 20 at 15:57
1 answer
April 7th 20 at 15:59
Solution
It works - but in this case, listen to keydown and how to make that list? - sheridan.Jacobs commented on April 7th 20 at 16:02
@Brook.Or, too lazy to write correctly, but in brief here https://stackblitz.com/edit/angular-hwespr
And of course all listeners should be hung using HostListener - Cornell.Feest commented on April 7th 20 at 16:05

Find more questions by tags AngularTypeScript