admin管理员组

文章数量:1336422

As I'm trying to put some angular in my mvc website, I encounter the following error at runtime

0x800a1391 - Erreur d'exécution Microsoft JScript: 'angular' est indéfini.

Which means: Error at Microsoft Jscript runtime: 'angular' is undefined .

This occurs for the following code

var customersApp = angular.module('propositionApp', ['ngGrid']);

Some research on the internet advise to add the following code in the head tag (i use angular 1.2.23)

<script src=".2.23/angular-resource.min.js">
</script>
<script src=".2.23/angular-route.min.js"></script>

But this generates even more runtime errors because some part of the code returned by the url are Null.

Of course, I've added angular to my project with nugget package.

Where does this problem "angular" is not defined?

As I'm trying to put some angular in my mvc website, I encounter the following error at runtime

0x800a1391 - Erreur d'exécution Microsoft JScript: 'angular' est indéfini.

Which means: Error at Microsoft Jscript runtime: 'angular' is undefined .

This occurs for the following code

var customersApp = angular.module('propositionApp', ['ngGrid']);

Some research on the internet advise to add the following code in the head tag (i use angular 1.2.23)

<script src="https://ajax.googleapis./ajax/libs/angularjs/1.2.23/angular-resource.min.js">
</script>
<script src="https://ajax.googleapis./ajax/libs/angularjs/1.2.23/angular-route.min.js"></script>

But this generates even more runtime errors because some part of the code returned by the url are Null.

Of course, I've added angular to my project with nugget package.

Where does this problem "angular" is not defined?

Share Improve this question asked Aug 27, 2014 at 16:48 KrowarKrowar 5912 gold badges8 silver badges18 bronze badges 1
  • You need to include angularjs as well before resource, route. – PSL Commented Aug 27, 2014 at 16:49
Add a ment  | 

1 Answer 1

Reset to default 5

It looks like you are not requiring the general angular library. Add

<script src="http://ajax.googleapis./ajax/libs/angularjs/1.2.23/angular.min.js"></script>

in the head of your document before your javascript files.

本文标签: javascriptMicrosoft Jscript Angular is undefinedStack Overflow