user1177842 user1177842 - 1 year ago 47
AngularJS Question

ngRoute not working when changing module

i am working with ngRoute. currently i am using ng-table plugin and jcs-autovalidation plugin. Therefore my module,

var app = angular.module("myApp", ['ngTable','jcs-autoValidate']);

problem is ngRoute not working with above module. when using like below,

var app = angular.module("myApp");

ngRoute is working well. how i use ngRoute with my plugins

Answer Source

Try to use one module for your application, and add all the necessary dependencies to it,

var app = angular.module('myApp', ['ngRoute','ngTable','jcs-autoValidate']);

So that you do not have to declare the module again,

app.directive('mydatepicker', function () {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download