Skip to content

Commit

Permalink
Install classlist polyfill for IE support
Browse files Browse the repository at this point in the history
  • Loading branch information
jannicz committed Dec 31, 2017
1 parent c5c656a commit 7890869
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"styles": [
"styles.css"
],
"scripts": [
"../node_modules/svg4everybody/dist/svg4everybody.min.js"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>SVG Icon Sprite Development</title><base href="ng-svg-icon-sprite"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.5d376d7361968661fcd5.bundle.css" rel="stylesheet"/></head><body><app-root></app-root><script type="text/javascript" src="inline.f35ffe166e6fc1027876.bundle.js"></script><script type="text/javascript" src="polyfills.4abdc5c9f829f458886f.bundle.js"></script><script type="text/javascript" src="scripts.d3d84dfb2ca4903ba23a.bundle.js"></script><script type="text/javascript" src="main.862dae64275db188e923.bundle.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>SVG Icon Sprite Development</title><base href="ng-svg-icon-sprite"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.5d376d7361968661fcd5.bundle.css" rel="stylesheet"/></head><body><app-root></app-root><script type="text/javascript" src="inline.56acb15d48939681a4b1.bundle.js"></script><script type="text/javascript" src="polyfills.1d5f4c55ee6ec254f48c.bundle.js"></script><script type="text/javascript" src="main.862dae64275db188e923.bundle.js"></script></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/polyfills.1d5f4c55ee6ec254f48c.bundle.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/polyfills.4abdc5c9f829f458886f.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/scripts.d3d84dfb2ca4903ba23a.bundle.js

This file was deleted.

7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
"@angular/platform-browser": ">4.0.0",
"@angular/platform-browser-dynamic": ">4.0.0",
"@angular/router": ">4.0.0",
"classlist.js": "^1.1.20150312",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14",
"svg-symbols": "^1.0.4"
"svg-symbols": "^1.0.4",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.6.2",
Expand Down
6 changes: 3 additions & 3 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import 'core-js/es6/weak-map';
import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';
Expand Down Expand Up @@ -65,5 +65,5 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
*/

/** IE10 and IE11 external SVG polyfill */
// import * as svg4everybody from 'svg4everybody/dist/svg4everybody.js';
// svg4everybody();
import * as svg4everybody from 'svg4everybody/dist/svg4everybody.js';
svg4everybody();

0 comments on commit 7890869

Please sign in to comment.