I am new to the AngularJS and I was learning it through CodeSchool's video series. But now I am facing an error when I try to route through a click on an image. Kindly help me.
Here are my HTML and JavaScript files
//app.js
/**
* Module
*
* Description
*/
angular.module('myModule', ['ngRoute'])
.controller('myCtrl', ['$scope', function($scope){
$scope.clicked="";
$scope.numberofClicks=0;
$scope.clickMe=function()
{
$scope.clicked="Image Clicked";
$scope.numberofClicks+=1;
alert("Image has been clicked");
};
}]);
//route.js
angular.module('myModule')
.config(['$routeProvider',function($routeProvider) {
$routeProvider.
when('/firstQuiz', {
templateUrl: 'templates/firstpage.html'
}).
when('/secondQuiz', {
templateUrl: 'templates/secondpage.html'
}).
otherwise({
redirectTo: '/'
});
}]);
Testing For Image Click
These are the two errors that I am facing:
Error: [$injector:nomod] http://errors.angularjs.org/1.5.5/$injector/nomod?p0=myModule angular.min.js:6:411
The other one is too long to paste it here.