javascript - TypeError: d.$$minErr is not a function in angular-route.min.js -
i got error: "typeerror: d.$$minerr not function". seems problem 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 working example http://plnkr.co/edit/ml2xjxuhwpvym1mywvcz?p=preview
i think, have incompatible versions of angular , angular-router. versions of both should 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>
Comments
Post a Comment