AngularJS - ngRepeat with multiple object types

后端 未结 2 1948
-上瘾入骨i
-上瘾入骨i 2020-12-24 02:39

I have a list of items. An item can be a number of things, let\'s say the list is something like so :

[userObject , vehicleObject , userObject , animalObject         


        
2条回答
  •  心在旅途
    2020-12-24 03:11

    Although this doesn't use ng-switch, it does get round the problem of not having a type field, which @DotNetHaggis pointed out.

    user info
    vehicle info
    animal info

提交回复
热议问题