just try the following code and getting the error
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Routing Intro</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.min.js"></script>
<script scr="example.js"></script>
</head>
<body ng-app="mainApp">
<div ng-view></div>
</body>
</html>
here is my example.js file
var application = angular.module ('mainApp', ['ngRoute']);
application.config (function ($routeProvider){
$routeProvider
.when('/', {
template : 'Welcome User!'
})
.when('/anotherPage',{
tempalte : 'Welcome to Another page'
})
otherwise ({
redirectTo : '/'
});
});
I am getting the following error angular.js:4458 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=mainApp&p1=Error%3A…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A19%3A463)