MD Ghouse MD Ghouse - 1 year ago 210
AngularJS Question

Failed to instantiate module MyApp due to

In my App.js when i added "var app = angular.module('MyApp', ['ngRoute.dirPaginate'])" im getting this Error if i Remove ngRoute its working fine.

Error: [$injector:nomod] Module 'dirPaginate' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.$injector/nomod?p0=dirPaginate


var app = angular.module('MyApp', ['ngRoute.dirPaginate'])


<body ng-app="MyApp">

<div class="container body-content">
@*<hr />
<p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>


<script src="~/Scripts/MyApp.js"></script>
@RenderSection("scripts", required: false)

Answer Source

change ut var Myapp to

var app = angular.module('MyApp', ['angularUtils.directives.dirPagination', 'ngRoute'])

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download