ng-click not working with ng-if

后端 未结 4 1849
抹茶落季
抹茶落季 2021-02-06 01:38

Why does the second button not work, when ng-if is used?

I want to realize a button that is present only when the model value is set / not \"\"/ not nul

4条回答
  •  伪装坚强ぢ
    2021-02-06 01:48

    It doesn't work because ng-if is creating a new scope and interpreting your blub = 'yyyy' as defining a new local variable in the new scope. You can test this by putting the second button to:

    
    

    However $parent is an ugly feature.

提交回复
热议问题