For some reason, the modal block works fine, but it does not load any templates that I specify.
My controller has this code;
var brnSearchModal = $modal({ scope: $scope, template: "app/rrn/searchBrn.html", contentTemplate: false, html: true, show: false }); $scope.showModal = function () { brnSearchModal.$promise.then(brnSearchModal.show); };
My HTML looks like this:
<button data-ng-click="showModal()" type="button" class="btn btn-info" data-animation="am-fade-and-slide-top"> BRN Lookup </button>
And my template is in the file and looks like this:
<div class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header" ng-show="title"> <button type="button" class="close" ng-click="$hide()">×</button> <h4 class="modal-title" ng-bind="title">Hello, World!</h4> </div> <div class="modal-body" ng-bind="content">Lorem ipsum dolor.</div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$hide()">Close</button> </div> </div> </div> </div>
There is no mistake. Everything seems to be working fine, but the template is not loading. If I debug angular -strap at some point, the template loads, but then disappears and leaves an empty modal.
javascript angularjs twitter-bootstrap angular-strap
Lukasz
source share