Kro*_*war 0 .net javascript asp.net-mvc visual-studio angularjs
当我试图在我的.net mvc网站上放置一些角度时,我在运行时遇到以下错误
0x800a1391 - Erreurd'exécutionMicrosoftJScript:'angular'estindéfini.
这意味着:Microsoft Jscript运行时出错:'angular'未定义.
对于以下代码会发生这种情况
var customersApp = angular.module('propositionApp', ['ngGrid']);
Run Code Online (Sandbox Code Playgroud)
一些关于互联网的研究建议在head标签中添加以下代码(我使用角度1.2.23)
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular-resource.min.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular-route.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
但是这会产生更多的运行时错误,因为url返回的代码的某些部分是Null.
当然,我已经使用nugget包为我的项目添加了角度.
这个问题"角度"在哪里没有定义?
看起来你不需要通用的角度库.加
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
在您的javascript文件之前的文档头部.
归档时间: |
|
查看次数: |
8822 次 |
最近记录: |