I am new to angularJs, while using routeProvider angularJs through following error. I tried everything but I did not found an solution.
Errors:
Error: Argument 'fn' is not a function, got string from viewApp
TypeError: angular.$$minErr is not a function
Here is my html file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="angular.min.js" language="javascript" type="application/javascript"></script>
<script src="angular-route.js"></script>
<script src="custom.js"></script>
<title>Anguler App</title>
</head>
<body ng-app="viewApp">
<a href="#/click">Home</a>
<div ng-view>
</div>
</body>
</html>
AngularJs code that I am using.
var myapp=angular.module('viewApp',[]);
myapp.config(['$routeProvider',function($routeProvider){
$routeProvider.when("/click",{
templateUrl:"partialview.html"
}).otherwise({
redirectTo: '/'
});
}]);