I got this error: "TypeError: d.$$minErr is not a function". It seems to be a problem with angular-route.
My code: index.htm:
<!DOCTYPE html>
<html ng-app="myApp" lang="en">
<head>
<script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="app.js"></script>
<meta charset="utf-8"/>
</head>
<body>
<search-result></search-result>
</body>
</html>
app.js
var myApp = angular.module('myApp', ['ngRoute']);
myApp.config(function($routeProvider){
$routeProvider
.when('/', {
templateUrl: 'pages/main.html',
controller: 'mainController'
})
});
// controllers
myApp.directive('searchResult', function() {
return {
restrict: 'AECM',
templateUrl: 'customDirectivePage.html',
replace: true
}
});
Here is working example http://plnkr.co/edit/ML2XJxUhWPvym1mYwVCZ?p=preview
I think, you have incompatible versions of angular and angular-router. Versions of both should be same.
<script src="https://code.angularjs.org/1.4.2/angular.js"></script>
<script src="https://code.angularjs.org/1.4.2/angular-route.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With