Why does ng-class = "ng-app" violate AngularJS?

To get AngularJS to work in IE7 and IE8, I add id = "ng-app" and class = "ng-app" to my ng-app element:

<html id="ng-app" class="ng-app" ng-app="myApp"> <div ng-view></div> </html> 

This always worked in the past, but now I have added class = "ng-app" to two different projects, and in both views it no longer appears in any browser. Has IE7 / 8 replacement method changed? I am using version 1.0.2 of the CDN.

Thanks.

+7
source share
1 answer

Editing Note: Adding a doctype tag will reduce some issues. Thanks @Mike Pateras

  <!doctype html> 

Original:

try it

 <html lang="en" class="ng-app:myapp" id="ng-app" ng-app="myapp" xmlns:ng="http://angularjs.org"> <head> <!--[if lt IE 9]>   <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>  <![endif]-->  <!--[if lte IE 8]>   <script>    document.createElement('ng-include');    document.createElement('ng-pluralize');    document.createElement('ng-view');    document.createElement('ng:include');    document.createElement('ng:pluralize');    document.createElement('ng:view');   </script>  <![endif]-->  <!--[if lt IE 8]>   <script src="https://cdnjs.cloudflare.com/ajax/libs/json2/20150503/json2.min.js"></script>  <![endif]--> </head> 
+12
source

All Articles