Chrome引发以下错误:
Uncaught :对象函数(){d.ready.apply(null,参数)}的属性'js‘不是函数
当火狐抛出一个TypeError: head.js is not a function
这是我的代码:
<!doctype html>
<html lang="eng" ng-app="app">
<head>
<meta charset="UTF-8">
<title>{{ page_title }}</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/headjs/0.99/head.core.min.js"></script>
</head>
<script>
head.js({ angularJS: "https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"},
{ jQuery: "http://code.jquery.com/jquery-1.10.1.min.js" },
{ internalApp: "app/js/app.js"});
head.ready('jQuery', function() {
$(document).ready(function() {
console.log('jQuery loaded successfully');
});
});
</script>
<body>
<!-- add data here -->
</body>
</html>发布于 2014-01-15 20:23:53
您已经加载了Responsive +功能检测脚本http://cdnjs.cloudflare.com/ajax/libs/headjs/1.0.3/head.core.min.js,而不是Asset http://cdnjs.cloudflare.com/ajax/libs/headjs/1.0.3/head.load.min.js
我只是犯了同样的错误,在查找答案时发现了这篇文章:)
https://stackoverflow.com/questions/17430735
复制相似问题