[英]opening Mobile-Angular-ui modal dialog from controller
I am using mobile-angular-ui for mobile devices. 我正在为移动设备使用mobile-angular-ui。 But i am facing issues with opening the dialog from controller.
但是我在从控制器打开对话框时遇到问题。
$scope.openModal = function() {
SharedState.initialize($scope, 'modal1');
// SharedState.turnOn('modal1');
$rootScope.Ui.turnOn('modal1');
var modalInstance = $modal.open({
templateUrl: '../scripts/app/account/modal-dialog/modal.html',
controller: 'SearchController', //This must be a referance, not a string
size: 'sm'
});
}
<a href ui-turn-on="modal1" ng-click="openModal()">link</a>
But i am getting empty modal content. 但是我正在得到空的模态内容。
Try $rootScope.Ui.turnOn('modal1') instead of SharedState.turnOn('modal1'); 试试$ rootScope.Ui.turnOn('modal1')而不是SharedState.turnOn('modal1');
github-mobile-angular-ui/issues/252 github-mobile-angular-ui / issues / 252
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.