单击后将事件传递给 ctrl。我想写一个条件,如果element.target
有类将返回truemodal-click-shield
问题:
我如何.hasClass()
使用event.target
angulars' jqlite
?
问题:
目前我收到一个类型错误,说:
$scope.exitModal = function(event){
// Return to current page when exiting the modal, via UI.
// After state return, should set focus on the matching link.
var target = event.target;
console.log(target.hasClass('modal-click-shield'));
});
错误:
类型错误:未定义不是函数
html:
<div class="modal-click-shield" ng-click="exitModal($event)">
<div ui-view="pdw" class="product-container"></div>
</div>