我遇到一个问题,即除了IE10和11之外,所有浏览器都可以使用简单的ng-click功能(还没有能够检查Edge。)
这是指令:
$scope.showMoreDetails = false;
$scope.toggleMoreDetails = function() {
$scope.showMoreDetails = !$scope.showMoreDetails;
};
这就是电话:
<a data-ng-if="!showMoreDetails" data-ng-click="toggleMoreDetails()"></a>
<a data-ng-if="showMoreDetails" data-ng-click="toggleMoreDetails()"></a>
感谢您的帮助,我现在已经结束了。
答案 0 :(得分:0)
Probably because you need a valid href in your anchor tag
答案 1 :(得分:0)
Your tags should look like this:
<a href="" data-ng-if="!showMoreDetails" data-ng-click="toggleMoreDetails()"></a>
<a href="" data-ng-if="showMoreDetails" data-ng-click="toggleMoreDetails()"></a>