Chrome 抛出以下错误:
未捕获的类型错误:对象函数 (){d.ready.apply(null,arguments)} 的属性“js”不是函数
虽然 Firefox 抛出一个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>