Angularjs ui bootstrap: how to vertical center modal component? : <p>Recently I am learning angularjs. I have used bootstrap before. With jquery, I can easily change the position of the modal component position to make it vertical align. Now with angularjs, it seems not very easy to do that. Here is a plunker link of ui bootstrap modal, Does anyone know how to make it vertical align?</p>

<p><a href="http://plnkr.co/edit/TvLQkPh0cs4McxfLpE9u?p=preview" rel="noreferrer">ui bootstrap modal component</a></p>

<p>1.index.html </p>

<pre><code>    &lt;!doctype html&gt;
    &lt;html ng-app="ui.bootstrap.demo"&gt;
    &lt;head&gt;
        &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.js"&gt;&lt;/script&gt;
        &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-animate.js"&gt;&lt;/script&gt;
        &lt;script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.2.1.js"&gt;&lt;/script&gt;
        &lt;script src="example.js"&gt;&lt;/script&gt;
        &lt;link href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div ng-controller="ModalDemoCtrl"&gt;
            &lt;script type="text/ng-template" id="myModalContent.html"&gt;
                &lt;div class="modal-header"&gt;
                    &lt;h3 class="modal-title"&gt;I'm a modal!&lt;/h3&gt;
                &lt;/div&gt;
                &lt;div class="modal-body"&gt;
                    This is modal body
                &lt;/div&gt;
                &lt;div class="modal-footer"&gt;
                    &lt;button class="btn btn-primary" type="button" ng-click="ok()"&gt;OK&lt;/button&gt;
                    &lt;button class="btn btn-warning" type="button" ng-click="cancel()"&gt;Cancel&lt;/button&gt;
                &lt;/div&gt;
            &lt;/script&gt;
            &lt;button type="button" class="btn btn-default" ng-click="open()"&gt;Open me!&lt;/button&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>2.example.js</p>

<pre><code>    angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']);
    angular.module('ui.bootstrap.demo').controller('ModalDemoCtrl', function($scope, $uibModal, $log) {

        $scope.items = ['item1', 'item2', 'item3'];

        $scope.animationsEnabled = true;

        $scope.open = function(size) {

            var modalInstance = $uibModal.open({
                animation: $scope.animationsEnabled,
                templateUrl: 'myModalContent.html',
                controller: 'ModalInstanceCtrl',
                size: size,
                resolve: {
                    items: function() {
                        return $scope.items;
                    }
                }
            });
        };
    });

    angular.module('ui.bootstrap.demo').controller('ModalInstanceCtrl',   function($scope, $uibModalInstance, items) {
        $scope.ok = function() {
            $uibModalInstance.close($scope.selected.item);
        };

        $scope.cancel = function() {
            $uibModalInstance.dismiss('cancel');
        };
    });
</code></pre>
