Created
December 12, 2014 15:05
-
-
Save MathRobin/5258b529c841c9a3f068 to your computer and use it in GitHub Desktop.
Angular sous IE7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ca nécessite à minima : | |
html5shiv : https://github.com/aFarkas/html5shiv | |
base64 : https://code.google.com/p/stringencoders/source/browse/trunk/javascript/base64.js?r=230 | |
JSON 2 : https://github.com/douglascrockford/JSON-js/blob/master/json2.js | |
Respond : https://github.com/scottjehl/Respond | |
Polyfills de toutes les méthodes de Array, Object, String, telles que (non exhaustif) : | |
- Object.keys https://github.com/MathRobin/object.keys | |
- Object.create https://github.com/MathRobin/object.create | |
- String.trim | |
- String.startsWith https://github.com/MathRobin/string.startsWith | |
- Array.prototype.indexOf | |
- Array.prototype.forEach | |
- Array.prototype.some https://github.com/MathRobin/array.some | |
- Array.prototype.lastIndexOf | |
- Array.prototype.every | |
- Array.prototype.map | |
- Array.prototype.filter | |
- Array.prototype.reduce | |
- Array.prototype.reduceRight | |
- Array.isArray | |
Certains de ces polyfills existent aussi dans https://github.com/MathRobin/flattener et dans la MDN tout simplement | |
Il faut aussi ajouter ça dans le code avant l'exécution d'angular: | |
document.createElement('ng-include'); | |
document.createElement('ng-pluralize'); | |
document.createElement('ng-view'); | |
document.createElement('ng:include'); | |
document.createElement('ng:pluralize'); | |
document.createElement('ng:view'); | |
Avec ça, t'as déjà au moins IE 8 et même IE 7 normalement. J'ai peut-être oublié des trucs, je laisse les commentaires ouverts pour améliorer le truc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment