我需要在angularJS中注入material.js,但是我有这个错误:
错误:[$ injector:unpr] http://errors.angularjs.org/1.6.4/ $ injector / unpr?p0 =%24%24HashMapProvider%20%3C-%20%24%24HashMap%20%3C-%20%24%24animateQueue% 20%3C-%20%24animate%20%3 C-%20%24compile%20%3 C-%20%24mdUtil%20%3 C-%20%24mdTheming%20%3 C-%20%24%24animateQueue
这是我的代码:
<link rel="stylesheet" href="SRC/Bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="SRC/Bootstrap/css/font-awesome.css" />
<script src="SRC/AngularJs/AngularJs.js"></script>
<script src="SRC/JQuery/JQuery.js"></script>
<script src="SRC/Bootstrap/js/bootstrap.min.js"></script>
<script src="SRC/AngularJs/Angular-route.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.6.4/angular-sanitize.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.4/angular-material.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-animate.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-aria.js"></script>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.4/angular-material.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.0.0-rc4/angular-material.layouts.css" rel="stylesheet">
这是我的模块:
var routeApp = angular.module('myApp', ['ngRoute','ngSanitize','ngMaterial']);
如果有人可以帮助我。
答案 0 :(得分:1)
问题来自我的版本,已解决:D
它像这样工作
<link rel="stylesheet" href="SRC/Bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="SRC/Bootstrap/css/font-awesome.css" />
<script src="SRC/JQuery/JQuery.js"></script>
<script src="SRC/Bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-route.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.6.4/angular-sanitize.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-animate.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.4/angular-material.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-aria.js"></script>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.4/angular-material.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.0.0-rc4/angular-material.layouts.css" rel="stylesheet">