AngularJs Inline Check if an array check

后端 未结 3 1723
庸人自扰
庸人自扰 2020-12-17 10:45

Inline in AngularJs is there a way to check if something is an array?

I would have thought this to work:

3条回答
  •  攒了一身酷
    2020-12-17 11:10

    I would separate logic from the view. Add state in scope and then check it

     $scope.showHi = angular.isArray(textStuff[0][1]);
    

    In view

    Hi

提交回复
热议问题