AngularJS, how do I make the UI dependent on which field has focus?

前端 未结 2 2029
無奈伤痛
無奈伤痛 2021-02-15 01:24

I have an AngularJS page with several form inputs.

When the some of the inputs have focus, I want to change other, arbitrary, aspects of the page.

For example, w

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-15 02:10

    ngFocus and ngBlur are built-in directives:

    
    

    The field has focus!!

    Try demo on jsfiddle

提交回复
热议问题