I'm using angularJS in my application but when I add config section for routing I'm get this error :
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.9/$injector/modulerr?p0=demoApp&p1=Error%3A…nts%2FGitHub%2FSirwanAfifi.github.io%2Fscripts%2Fangular.min.js%3A32%3A232)
this is my code :
var demoApp = angular.module('demoApp', []);
demoApp.config(function ($routeProvider) {
$routeProvider
.when('/',
{
controller: 'CustomerController',
templateUrl: 'views/view1.html'
})
.when('/view1',
{
controller: 'CustomerController',
templateUrl: 'views/view1.html'
})
.otherwise({redirectTo:'/'});
});
I found this answer but I'm not using angular-route.min.js
, I just want to use simple route in my application.