-
Notifications
You must be signed in to change notification settings - Fork 27.4k
es6 + angu 1.5.5 + babel = exception #14676
Comments
There is not enough info here to investigate. What is the context ? |
тут же все написано вроде. предоставил оба файла с классом и подключением к модулю. Как воспроизвести Вам эту ошибку? - да просто добавить в любой Ваш проект эти два файла... |
|
There is (still) not enough info to be sure, but it seems like we are failing to detect you are using a class and not a plain old constructor function. Could be a browser issue, a transpiler issue or an issue with Angular. |
Without some extra context, it is hard to know what is going on, so I will make my best guess. I think the issue is the following, Babel here https://github.com/babel/babel/blob/master/packages/babel-helpers/src/helpers.js#L95 is trying to check that their transformed |
@lgalfaso This |
@thorn0 you are right, then the alternatives would be to wait for 1.6 to be out or for Babel not to do this check (do not know if there is a flag to control this or not). One way or another, I think that Angular is doing the right thing here. Unless somebody has an objection, I would like to close this issue. |
Since we are considering removing the "pre-assign bindings on controller instance before instantiating" feature in 1.6 (or making opt-in), it would be a good idea to make it opt-out in 1.5.x (so we could get feedback from developers using it and fix any issues, before making it "mainstream"). That would also solve this issue. |
I'm now is busy with other projects, be sure to accomplish your goal in a couple of days |
Although support for disabling bindings pre-assignment has landed in master (with #15095), I don't see how this is related to this issue. I don't know what I was thinking in #14676 (comment) 😕 In any case, I agree with #14676 (comment); there is nothing more Angular can do (without risking breaking apps). Closing... |
https://docs.angularjs.org/error/ng/areq?p0=module&p1=not%20a%20function,%20got%20Object
View/Core.js
Core.js
package.json
webpack.config.js
The text was updated successfully, but these errors were encountered: