Я недавно попытался создать ионный модальный. Я начал с рассмотрения нескольких примеров, которые я нашел в Интернете, но я не могу заставить их работать. Может кто-нибудь сказать мне, где я ошибаюсь? Заранее спасибо :)Ионный модальный не открывается
Calling модальный:
<button class="ion-ios-information-outline button button-clear" ng-click="openModal()"></button>
JS:
angular.module('Mob').controller('TeamCtrl', function($scope, $ionicModal) {
/* Modal */
$ionicModal.fromTemplateUrl('intro-modal.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal
})
$scope.openModal = function() {
$scope.modal.show()
}
$scope.closeModal = function() {
$scope.modal.hide();
};
$scope.$on('$destroy', function() {
$scope.modal.remove();
});
};
Модальная страница:
<script id="intro-modal.html" type="text/ng-template">
<div class="modal">
<ion-header-bar>
<h1 class="title">Edit Contact</h1>
</ion-header-bar>
<ion-content>
<div class="list">
<label class="item item-input">
<span class="input-label">Name</span>
<input type="text" ng-model="contact.name">
</label>
<label class="item item-input">
<span class="input-label">Info</span>
<input type="text" ng-model="contact.info">
</label>
</div>
<button class="button button-full button-energized" ng-click="closeModal()">Done</button>
</ion-content>
</div>
</script>
есть какая-то ошибка? – eladcon
Нет, он просто не открывает модную страницу – TheGarrett