我試圖讓一個AngularJS應用程序。但我收到此錯誤:由於在AngularJS中實例化模塊應用失敗?
Failed to instantiate module app due to
這裏是我的代碼:
<html>
<head><title>New Version!</title>
</head>
<body ng-app="app">
<div ng-controller="appcontr">
<ul>
<li>A new XSLT engine is added: Saxon 9.5 EE, with a namecense (thank you Michael Kay!)</li>
<li>XSLT 3.0 support when using the new Saxon 9.5 EE engine!</li>
<li>Preview your result as HTML when doctype is set to HTML (see this example)</li>
<li>Preview your result as PDF when doctype is set to XML and your document starts with root element of XSL-FO.
Apache FOP is used to generate the PDF
</li>
<li>Added some namenks to useful XSLT sites</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.js"/>
<script>
angular.module('app', []).controller('appcontr', appcontr)
function appcontr($scope) {
$scope.name = 'dd'
}
</script>
</body>
</html>
你得到任何原因未能實例? –
由於**什麼**?錯誤消息包含有關錯誤的信息,並且在問題中省略。它可以通過做**來修復**。 – estus
'未捕獲的錯誤:[$ injector:modulerr]由於以下原因而無法實例化模塊應用程序: 錯誤:[$ injector:nomod]模塊'app'不可用!您拼錯了模塊名稱或忘記加載模塊名稱。如果註冊模塊,請確保您指定依賴關係作爲第二個參數。' – georgeawg