Skip to content

Commit

Permalink
Add required polyfills for IE 11 supporting
Browse files Browse the repository at this point in the history
  • Loading branch information
skynetigor committed Jan 21, 2019
1 parent 49acbaf commit 7ff4556
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core';
import { AfterViewChecked, Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
import { DropdownControlModel, FormModel, TemplateModel, TextFieldModel } from 'dynamic-form';
import { TextfieldComponent } from 'dynamic-form';

Expand All @@ -7,7 +7,7 @@ import { TextfieldComponent } from 'dynamic-form';
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit, AfterViewChecked {
export class AppComponent implements OnInit, AfterViewInit {
config = new FormModel({
list: new DropdownControlModel({
options: ['hello', 'amigos', 'privet', 'medved'],
Expand Down Expand Up @@ -57,7 +57,7 @@ export class AppComponent implements OnInit, AfterViewChecked {
}
}

ngAfterViewChecked(): void {
ngAfterViewInit(): void {
this.config.controls.list3.outputs.dropdownOpened.subscribe(console.log);
this.config.controls.list.outputs.dropdown2Opened.subscribe(t => {
console.log(` dropdown2Opened ${t}`);
Expand Down
19 changes: 11 additions & 8 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/

/* Required polyfills */
import 'core-js/es6/string'; // nnn
import 'core-js/es6/array'; // nnn
/* END */

// 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';
Expand Down Expand Up @@ -59,11 +63,11 @@
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/

// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*
/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
Expand All @@ -72,8 +76,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.

import 'zone.js/dist/zone'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down

0 comments on commit 7ff4556

Please sign in to comment.