Why mixing interpolation and expressions is bad practice

后端 未结 2 598
無奈伤痛
無奈伤痛 2020-11-22 05:38

From the Docs:

Embedding interpolation markup inside expressions

Note: AngularJS directive attributes take either

2条回答
  •  感动是毒
    2020-11-22 06:03

    Directives which expect Boolean values won't work:

    ERRONEOUS

    
    

    When the expression evaluates to the Boolean value false, interpolation will return the string "false". Strings that have length greater than zero are truthy. The ng-hide directive will always hide and never show the input element.

    CORRECT

     
    

提交回复
热议问题