<li class="" ng-repeat="info in vm.moreInfos">
<p ng-if="angular.isArray(info.value)">
<ul class="list-unstyled no-margin no-padding">
<li ng-repeat="item in info.value">
<label>{{item.key | i18n}}</label>
<span>{{item.value}}</span>
</li>
</ul>
</p>
</li>
如上代码,ng-if始终是false,p无法显示。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不能
根据Angular文档
angular表达式是访问不到位于Javascript全局变量的angular对象的。
只能访问$scope下的对象。建议在$scope下写一个函数来解决这个问题。
这样不行么?为啥首先想到的是用
angular.isArray?