我有一個角度控制器,想在我的視圖中打開模態。如何從角度控制器打開模態
我的HTML
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
Settings Controller
function SettingsController($scope,WalletManager,Storage){
$scope.pageClass = 'page-settings';
];
$scope.myModal = function() {
var modalInstance = $myModal.open({
});
如何從控制器打開?
新建角..需要儘快做到這一點,而無需學習如何角作品......我不明白的人誰不利於任何一件事積極,只是去發表愚蠢的評論......目的是什麼? –