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

Conflict with Prototype.js #6221

Closed
webspeaks opened this Issue Jan 2, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@webspeaks

webspeaks commented Jan 2, 2016

I tried integrating angular 2 with Magento framework which uses Prototype as its main JS framework.
But angular 2 does no run on it. Even if you include prototype.js in any simple angular app, it will break.

I have created a plunker: http://plnkr.co/edit/XKKpriTPrTX3tXqqz8v2?p=preview

Error: No provider for ExceptionHandler!

@nikolafon

This comment has been minimized.

nikolafon commented Jan 7, 2016

This is a show stopper for me. I'm migrating Richfaces, which apparently is using Prototype.js, to the Angular 2 and for the time being I have to run it side by side. Angular 2 is crashing with this error when trying to bootstrap.

@nikolafon

This comment has been minimized.

nikolafon commented Jan 8, 2016

Prototype overrides behaviour of Array.from function. It might be prototype issue not Angular.
If you change prototype library (comment Array.from = $A; line) Angular works just fine.
Angular can't control what other shim libraries you use and you can brake a lot of stuff if you alter standard javascript functions.

@gdi2290

This comment has been minimized.

Member

gdi2290 commented Jan 11, 2016

@webspeaks

This comment has been minimized.

webspeaks commented Jan 11, 2016

@gdi2290 Its awesome. Thanks a ton for your help 👍

@webspeaks webspeaks closed this Jan 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment