admin管理员组文章数量:1290971
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
}
});
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
}
});
Share
Improve this question
asked Jul 8, 2015 at 21:44
thadeuszlaythadeuszlay
3,0157 gold badges37 silver badges71 bronze badges
7
- Can you add plunker with error? – milanlempera Commented Jul 9, 2015 at 4:33
- With plunker, do you mean this? – thadeuszlay Commented Jul 9, 2015 at 4:36
- yes, you can create there simple example with error. – milanlempera Commented Jul 9, 2015 at 4:42
- plnkr.co/edit/L1BDaRmnPCfTemG6lSiu?p=preview – thadeuszlay Commented Jul 10, 2015 at 7:26
- @milanlempera: The save feature faild somehow. Maybe you can access it for colloboration: 2uTt6K3n389u5Pjb – thadeuszlay Commented Jul 10, 2015 at 7:27
1 Answer
Reset to default 10Here is working example http://plnkr.co/edit/ML2XJxUhWPvym1mYwVCZ?p=preview
I think, you have inpatible versions of angular and angular-router. Versions of both should be same.
<script src="https://code.angularjs/1.4.2/angular.js"></script>
<script src="https://code.angularjs/1.4.2/angular-route.js"></script>
本文标签: javascriptTypeError dminErr is not a function in angularrouteminjsStack Overflow
版权声明:本文标题:javascript - TypeError: d.$$minErr is not a function in angular-route.min.js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741519281a2383082.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论