Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet Explorer 11 support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion src/app/made-with-love/made-with-love.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ name }}
</ng-template>

<span [style.font-size.em]="size">
<span [style.font-size.em]="size" (click)="changeColor()">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @colthreepv,
Thanks for your contribution!

I'm wondering why should we need to invoke changeColor and how is that related for supporting IE 11? 🤔

Made with <span [style.color]="color">♥</span> by
<ng-container *ngIf="url && url.length > 0; else noUrl">
<a [attr.href]="url" target="_blank">{{ name }}</a>
Expand Down
5 changes: 5 additions & 0 deletions src/app/made-with-love/made-with-love.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ export class MadeWithLoveComponent implements OnInit {
console.error(`Name attribute must be provided!`);
}
}

changeColor() {
this.color = this.color === 'red' ? 'blue' : 'red';
}

}
32 changes: 16 additions & 16 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
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`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
import 'core-js/es6/reflect';

// Used for browsers with partially native support of Custom Elements
import '@webcomponents/custom-elements/src/native-shim';
// import '@webcomponents/custom-elements/src/native-shim';

// Used for browsers without a native support of Custom Elements
import '@webcomponents/custom-elements/custom-elements.min';
Expand Down