I am working on an Angular 5.2
app and it is not working properly on IE11
, Safari 5.7.1 (windows)
and iPad
.
When my app initializes, it gets data from an API on the same server and creates a dynamic table using this API data. It is working fine in chrome
and firefox
but in Safari
, IE11
and iPad
, it loads partially and dynamic content doesn't display as it is unable to communicate to the server and fetch API
data.
I looked for the possible solutions on the internet and also tried to modify polyfill.js as instructed here, here and similar questions but it is not working in my case.
even I can see my login form, but login is also not working as cannot communicate to API
server in safari
and IE11
.
pollyfills.ts
// This file includes polyfills needed by Angular and is loaded before the app.
// You can add your own extra polyfills to this file.
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/reflect';
import 'core-js/client/shim';
import 'whatwg-fetch'
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
// If you need to support the browsers/features below, uncomment the import
// and run `npm install import-name-here';
// Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
// Needed for: IE9
import 'classlist.js';
// Animations
// Needed for: All but Chrome and Firefox, Not supported in IE9
import 'web-animations-js';
// Date, currency, decimal and percent pipes
// Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
import 'intl';
// NgClass on SVG elements
// Needed for: IE10, IE11
import 'classlist.js';
my service method to get data:
readServices(){
let data:any = {server_status_code:this.server_status_code}
let body = prepareData(data);
return this._http.post(this.URL,body);
}
Error in Safari console:
ERROR
Response
_body: XMLHttpRequestProgressEvent
headers: Headers
line: 20093
ok: false
sourceId: 2123356416
sourceURL: "http://localhost:4200/vendor.bundle.js"
status: 0
statusText: ""
type: 3
url: null
__proto__: Response type: 3
url: null
__proto__: Response
constructor: function Response(responseOptions) {
toString: function () {
__proto__: Body
Please provide appropriate guidance. Thanks.