使用$ionicModal弹出的model窗口
工程引入boostrap3.3.4后 model窗口变成一个黑色的modal层 没有动画 也没有内容
下面是代码大家可以试试,代码很简单,没有及任何特技,然而也并没有出来效果…
index.html
home.html
modal.html
ion-modal-view
关闭
Hello!
app.js
app.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: "/home",
templateUrl: "templates/home.html",
controller: 'HomeCtrl'
});
$urlRouterProvider.otherwise('/home');
controller.js
app.controller('HomeCtrl', function($scope, $state, $ionicModal) {
$ionicModal.fromTemplateUrl("templates/model.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();
};
});
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
可以只引入 bootstrap 需要的部分,例如 Grid system,Basic utilities,Responsive utilities
参考 http://forum.ionicframework.com/t/responsive-grid-layout/707/20