angularjs if statements?

后端 未结 8 1819
暖寄归人
暖寄归人 2021-01-04 20:06

So I\'m running through the tutorial for AngularJS:

I have an array defined in the controller and i\'m returning different points in the array by calling when i\'m l

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 20:06

    I think the answer needs an update.

    Previously you could use ngIf directive from AngularUI project (code here if you still want to download it), bad news is that it's not maintained any more.

    The good news is that it has been added to the official AngularJS repo (unstable branch) and soon will be available in the stable one.

    Foo bar

    Will not just hide the DIV element, but remove it from DOM as well (when something is falsy).

提交回复
热议问题