diff options
| author | Brian Campbell | 2013-04-10 18:46:57 -0600 | 
|---|---|---|
| committer | Vojta Jina | 2013-04-11 13:00:41 -0700 | 
| commit | 13000c7350248bad01dd419ba7135f837a916d3d (patch) | |
| tree | d8044bc919351af2affde24fe433a192f683915a /docs | |
| parent | fd2649fc656544d5314f45edde9f7925a850bc91 (diff) | |
| download | angular.js-13000c7350248bad01dd419ba7135f837a916d3d.tar.bz2 | |
docs(guide): updates for legacy IE7 support
- note re: id="ng-app" to bootstrap/IE partials
- added doctype/xmlns to markup
- add cond comment re: json2/3 to markup
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/content/guide/bootstrap.ngdoc | 4 | ||||
| -rw-r--r-- | docs/content/guide/ie.ngdoc | 71 | 
2 files changed, 50 insertions, 25 deletions
diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc index 3be24bb5..f72945d1 100644 --- a/docs/content/guide/bootstrap.ngdoc +++ b/docs/content/guide/bootstrap.ngdoc @@ -38,6 +38,10 @@ initialization.          <html ng-app> +  * If IE7 support is required add `id="ng-app"` + +        <html ng-app id="ng-app"> +    * If you choose to use the old style directive syntax `ng:` then include xml-namespace in `html`      to make IE happy. (This is here for historical reasons, and we no longer recommend use of      `ng:`.) diff --git a/docs/content/guide/ie.ngdoc b/docs/content/guide/ie.ngdoc index 0fc2b065..8f65a63b 100644 --- a/docs/content/guide/ie.ngdoc +++ b/docs/content/guide/ie.ngdoc @@ -15,33 +15,54 @@ To make your Angular application work on IE please make sure that:    1. You polyfill JSON.stringify if necessary (IE7 will need this). You can use       [JSON2](https://github.com/douglascrockford/JSON-js) or       [JSON3](http://bestiejs.github.com/json3/) polyfills for this. - -  2. you **do not** use custom element tags such as `<ng:view>` (use the attribute version +     <pre> +       <!doctype html> +       <html xmlns:ng="http://angularjs.org"> +         <head> +           <!--[if lte IE 8]> +             <script src="/path/to/json2.js"></script> +           <![endif]--> +         </head> +         <body> +           ... +         </body> +       </html> +     </pre> + +  2. add `id="ng-app"` to the root element in conjunction with `ng-app` attribute +     <pre> +       <!doctype html> +       <html xmlns:ng="http://angularjs.org" id="ng-app" ng-app="optionalModuleName"> +         ... +       </html> +     </pre> + +  3. you **do not** use custom element tags such as `<ng:view>` (use the attribute version       `<div ng-view>` instead), or -  3. if you **do use** custom element tags, then you must take these steps to make IE happy: - -<pre> -  <html xmlns:ng="http://angularjs.org"> -    <head> -      <!--[if lte IE 8]> -        <script> -          document.createElement('ng-include'); -          document.createElement('ng-pluralize'); -          document.createElement('ng-view'); - -          // Optionally these for CSS -          document.createElement('ng:include'); -          document.createElement('ng:pluralize'); -          document.createElement('ng:view'); -        </script> -      <![endif]--> -    </head> -    <body> -      ... -    </body> -  </html> -</pre> +  4. if you **do use** custom element tags, then you must take these steps to make IE happy: +     <pre> +       <!doctype html> +       <html xmlns:ng="http://angularjs.org" id="ng-app" ng-app="optionalModuleName"> +         <head> +           <!--[if lte IE 8]> +             <script> +               document.createElement('ng-include'); +               document.createElement('ng-pluralize'); +               document.createElement('ng-view'); +      +               // Optionally these for CSS +               document.createElement('ng:include'); +               document.createElement('ng:pluralize'); +               document.createElement('ng:view'); +             </script> +           <![endif]--> +         </head> +         <body> +           ... +         </body> +       </html> +     </pre>  The **important** parts are:  | 
