Reputation: 321
I'm not able to load the modal service into my simple rookie angular controller example, I've included the plunker below. Can anyone suggest what I'm doing wrong? any help much appreciated! Thanks
http://plnkr.co/edit/VVyMsRMVg5DzeqpnvWSQ?p=preview
code snippet
app.controller('MainController', ['$scope', 'FService', 'angularModalService', function($scope, FService, angularModalService) {
$scope.show = function() {
angularModalService.showModal({
templateUrl: 'modal.html',
controller: "ModalController"
}).then(function(modal) {
modal.element.modal();
modal.close.then(function(result) {
$scope.message = "You said " + result;
});
});
};
}
Upvotes: 0
Views: 52
Reputation: 422
I found this very helpful. Hope you do too.
http://weblogs.asp.net/dwahlin/building-an-angularjs-modal-service
Upvotes: 1