Skip to content

"Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten #1008

Closed
@taruntadikonda

Description

@taruntadikonda

There is error when exceljs is used in code.

Error:

Error: "Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)"
Angular 5
o exceljs.min.js:3

My service.ts file

import { Injectable } from '@angular/core';
import * as Excel from "exceljs/dist/exceljs.min.js";
import * as fs from 'file-saver';
@Injectable({
providedIn: 'root'
})
export class ExcelserviceService {

constructor() { }

generatereport(dummydata):void{

let workbook = new Excel.Workbook();

let worksheet = workbook.addWorksheet('Car Data');

}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions