【发布时间】:2016-11-09 11:10:35
【问题描述】:
我遵循了从here 获取的解决方案,但它不起作用。我需要将模式在屏幕中间居中,水平和垂直。我尝试了这个plunk,但它不起作用,有什么想法吗?
Javascript
var app = angular.module('app', ['ui.bootstrap']);
app.controller('ctl', function ($scope,$uibModal) {
$scope.modalInstance = $uibModal.open({
templateUrl: 'myModalContent.html',
windowClass: 'app-modal',
});
});
HTML
<style>
.app-modal .modal-content {
width: 360px;
height: 200px;
}
</style>
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<h4 class="modal-title">The Title</h4>
</div>
<p>Some text</p
</script>
【问题讨论】:
标签: angularjs angular-ui-bootstrap angular-ui