如何關閉角度ui路由上的模式,使用ng-click
?角ui路徑隱藏模式
我有UI航線角這個HTML文件:
<div ui-view="modalView"></div>
<div ui-sref="openModal">Open Modal</div>
這是我的配置:
$stateProvider.state('openModal', {
views: {
'modalView': {
templateUrl: "/partials/Modal.html"
}
}
然後在我的Modal.html我:
<div style ="position:fixed; width:100%; heigth:100%; background-color:black;">
//i want to click in this div and close the modal
<div style = "position:relative; float:right;"><i class="fa fa-times fa" aria-hidden="true"></i></div>
</div>
如何在不使用jQuery的情況下做到這一點?
好的,謝謝你。 – John