0

I am using angularjs in my application, by using ngDialog the page is not loading and shows blank page

I have used like

angular.module('pswApp', ['ngRoute', 'ngAnimate', 'ngTouch', 'ngDialog', 'ui.grid', 'myApp','newApp'])
.config(['$routeProvider',
  function($routeProvider) {}]);

But the page is not loaded, when i use ngDialog in the module wherever i use it. I have used the ngDialog.js file in the common html file and i load the pages using ng route

Even i used it in another js file like this

angular.module('myApp', [ 'ngDialog' ]).controller('mainCtrl',
        function($scope, ngDialog) {

});

The page is not getting loaded, is there any other way to solve this issue.

1 Answers1

0

You are declaring module again while defining controller. Injection should also be in controller.

angular.module('myApp', []).controller('mainCtrl', 'ngDialog',
        function($scope, ngDialog) {
});
Amit
  • 348
  • 1
  • 6
  • 12