Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: d.$$minErr is not a function in angular-route.min.js

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
   }
});
like image 320
thadeuszlay Avatar asked Sep 23 '26 22:09

thadeuszlay


1 Answers

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>
like image 79
milanlempera Avatar answered Sep 25 '26 12:09

milanlempera



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!