2017-04-25 54 views

回答

0

你可以捕捉鍵盤,並設置一些CSS樣式效仿的焦點

@Component({ 
    .... 
    host: {'(document:keydown)': 'handleKeyboardEvents($event)'} 
}) 


    private handleKeyboardEvents(event: KeyboardEvent) { 
    if (event.keyCode === 40 && MenuPressed) {//down 
     //implement here your logic 
創建一個問題