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

OData adapter error in Angular app #221

Open
coni2k opened this issue Sep 12, 2018 · 1 comment
Open

OData adapter error in Angular app #221

coni2k opened this issue Sep 12, 2018 · 1 comment

Comments

@coni2k
Copy link
Contributor

coni2k commented Sep 12, 2018

When using "breeze-client" with "OData" adapter & "data.js" in an Angular app, it throws the following exception:

Unable to initialize OData.  Needed to support remote OData services

The issue is related with global object being empty, which is used in \breeze-client\breeze.debug.js file, __requireLibCore function:

Line 424: var window = global.window;

Since window variable itself is already available in that context, commenting out this line solves the problem.

I have created a small application as a demo:
https://github.com/forCrowd/Labs-AngularCLI-BreezeJS

To see the error, you can remove the following line in app.module.ts:

Line 5: import "./breeze-client-odata-fix";
@steveschmitt
Copy link
Member

Is this still a problem with breeze-client 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants