我正在尝试使用模态服务。以下有什么问题:
http://jsfiddle.net/9Ymvt/651/
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-strap/0.7.4/angular-strap.min.js"></script>
<div class="content" ng-app="contacts" ng-controller="ContactsController">
</div>
angular.module('contacts', ['$strap.directives'])
.controller('ContactsController', function ($scope) {
var modalPromise = $modal({template: '/js/app/views/elements/modal-welcome.html', persist: true, show: false, backdrop: 'static', scope: $scope});
// Toggle modal
$scope.showModalViaService = function() {
$q.when(modalPromise).then(function(modalEl) {
modalEl.modal('show');
});
};})