-
Notifications
You must be signed in to change notification settings - Fork 100
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
ngx-tour-ng-bootstrap broken with es6 #77
Comments
Thanks for the thorough bug report. It's very nice to have a simple repo that reproduces the problem. I submitted a PR to your repo that switch to using the And as I was typing up the response I had another idea. This workaround will work. I'm not sure why it's necessary only for es6 though.
|
Hey guess what, the bug is in Angular. Specifically, Angular only supports ES6 properly in AOT mode which is used neither by default ( I think this means we have to target ES5 until Angular either stops using JIT for tests or supports ES6 in JIT mode. My gut feeling now is that we've been getting lucky so far that our tests haven't been broken by our use of ES6. The repro here happens to be one case where one of the known ES6+JIT bugs crops up. So we do have to go make our code target ES5 if we want our tests to reliably pass, even though we can use ES6 in our prod builds (which use AOT). |
Thanks @isaacplmann for digging and for the workaround -- I think that since we've just been getting lucky so far, we'll port back to es5 where I am optimistic the bug won't show up. |
Hey,
I'm finding that ngx-tour does not work for Angular projects set to target
es6
. In these cases, Angular apparently fails to inject theRouter
when constructing theNgbTourService
, leading to this trace:Deeper reproduction instructions below.
es6 is pretty nice, and Angular has supported it since September -- ng-cli version v1.5.0.
Thanks!
This repo https://github.com/dhalperi/ngx-tour-bug has three commits:
ng-cli new testtour
.(https://github.com/dhalperi/ngx-tour-bug/commit/5e3451ce02e85c162392cab17e42e27db0b18e91).
es5
toes6
(https://github.com/dhalperi/ngx-tour-bug/commit/2f44c1d6a5e2ebee58476a0136495434e5245cca).After the second commit, ngx-tour-ng-bootstrap seems to work great.
After switching to
es6
, the library fails as described above -- see the developer console error messages.The text was updated successfully, but these errors were encountered: