I have issue with angular2, when I had created service, and attached it into appModule to providers:[] section, I had error:
Uncaught TypeError: Cannot set property 'stack' of undefined
    at SyntaxError.set [as stack] (eval at <anonymous> (http://localhost:8080/vendor.js:94:2), <anonymous>:1628:63)
    at assignAll (eval at <anonymous> (http://localhost:8080/polyfills.js:2217:2), <anonymous>:704:29)
I have done two apps and I havent meet with similar error before... This is my simple service file:
Injectable()
export class RecordService {
    private API_END_POINT: string = 'app/records';
    private API = process.env.API_END_POINT;
    constructor(private http: Http ) {
    }
    getRecords(): Observable<any> {
        return this.http
            .get( this.API_END_POINT )
            .map( (res:Response) => res.json().data as RecordModel )
            .catch(this.handleError);
    }
    private handleError(error: any): Promise<any> {
        console.error('An error occurred', error);
        return Promise.reject(error.message || error);
    }
}
I have no idea how to fix that, there is no any information about this err nowhere... Please for help!
there seems to be a bug in zone.js. Try fixing the version to 0.7.4 and see if the error message is more explicit
check here for more info
npm install --save [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With