angularjs if statements?

后端 未结 8 1783
暖寄归人
暖寄归人 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:13

    I do not think there is if statement available. For your styling purpose, ng-class can be used.

    ng-switch is also convenient.

    -- update --

    take a look at: https://stackoverflow.com/a/18021855/1238847

    angular1.2.0RC seems to have ng-if support.

提交回复
热议问题