使用离子模态会产生空白黑屏
Use of ionic modal gives blank black screen
我正在用Ionic Framework制作一个应用程序。
当我单击据说可以打开ionicModal的按钮时,显示一个空白的黑屏。
网页代码:
<div class="well">
<h4>Add Proof</h4>
<button style="width:100px;height:10px" class="button button-dark" ng-click="modal.show()">Add</button>
</div>
<script id="templates/newItem.html" type="text/ng-template">
<ion-modal-view>
<ion-header-bar class="bar bar-header bar-positive">
<h1 class="title">Add Proof</h1>
<button class="button button-clear button-primary" ng-click="modal.hide()">Cancel</button>
</ion-header-bar>
<ion-content class="padding">
<div class="list">
<label>
<h4>Select from Pictures</h4>
<button class="button button-small button-dark">Browse</button>
</label>
<label class="item item-input">
<input type = "text" placeholder="Description">
</label>
</div>
</ion-content>
</ion-modal-view>
</script>
控制器代码:
.controller('ProCtrl', ['$scope', '$state', '$ionicModal', function($scope, $state, $ionicModal) {
$ionicModal.fromTemplateUrl('templates/newItem.html', {
scope: $scope
}).then(function(modal) {
$scope.modal = modal;
});
}]);
我的代码出了什么问题?
如果您的索引.html文件包含
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
删除它。
相关文章:
- 我想使用模态通过php文件发送邮件,并且我希望在提交关闭后关闭pop
- 打开一个模态并将其链接到AngularJS中的指令
- SemanticUI模态not onDeny/onApprove事件未激发
- 有没有比在app.js上绑定模块名称更好的方法来动态加载视图模型和视图以显示模态
- 如何通过所选索引(AngularJS)在模态弹出窗口中显示数据
- 包含数据库中相关信息的开放模态
- bootstrap消除模态并显示另一个模态
- 模态提示-如何重写此代码
- 模态框无法正常工作
- 将数据传递给由服务创建的Ionic模态
- iframe模态无法关闭
- 点击AngularJS模态窗口捕捉背景事件
- jqueryajax调用是复制url,当在模态视图之后在外部js文件中进行调用时
- 使用模态对话框(JQuery)编辑函数
- 如何在模态实例中使用filter
- 页面上有多个模态框
- 如果满足某些条件,如何在不调用模态的情况下首先调用类
- 在将缩略图链接到模态时遇到问题
- 使用离子模态会产生空白黑屏
- 角度:在另一个模态指令中加载的谷歌地图指令保持空白