0

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;
        });
    });
  };
  }
Jamie
  • 321
  • 1
  • 6
  • 18
  • Since you're using ui-bootstrap, here's another plunker that might provide you with insights and some added features http://plnkr.co/edit/FK9o5DWOqxmePZJEW75v?p=preview – ElliotPsyIT Apr 14 '15 at 21:34

1 Answers1

1

I found this very helpful. Hope you do too.

http://weblogs.asp.net/dwahlin/building-an-angularjs-modal-service

batmaniac7
  • 422
  • 5
  • 17
  • Be carefull with that code, after minification will not work unless using minification best practices: http://stackoverflow.com/questions/18782324/angularjs-minify-best-practice – napstercake Aug 24 '15 at 15:55