Я использую mobile-angular-ui для мобильных устройств. Но я сталкиваюсь с проблемами с открытием диалога с контроллера.
$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>
Но я получаю пустой модальный контент.
Попробуйте $ rootScope.Ui.turnOn('modal1') вместо SharedState.turnOn('modal1');