-
Notifications
You must be signed in to change notification settings - Fork 433
Life cycle functions never called in IE9 and 10 when using typescript #192
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
Comments
Thanks for reporting this. This is because IE9 and 10 does not have |
Meanwhile you can use v6.0.0. this should not happen on that version. |
I am experiencing the same here with chrome. Simply put, the reason for this is vue-class-component/src/component.ts Line 40 in fd73736
while vue-router will extract these guards directly from the def.options object What would be the best solution now. Register the guards on def.options or on def.options.methods? Is there even a global beforeRoute*? When not, registering these hooks on def.options should make more sense instead of registering them with def.options.methods, as the latter is actually not supported by vue-router. |
As a side node, when using babel everything works just fine. Wondering why, though. |
I saw your reproduction in vue-router issue. The reason is you are registering the hooks after declaring component. As stated in readme you have to register it before component declaration. |
@ktsn hmpf, may I be so stupid? next try... |
@ktsn while your are correct in that the order by which the components are loaded and the respective hooks are registered is incorrect, even when reorganising the sources, it still fails. |
Then could you open a new issue with the code? It probably be different issue with this issue. |
@ktsn will do |
In IE9 and IE10, the life cycle functions are never called if I use the decorator. If I export an object, it works just fine.
Class (not working): https://github.com/pcmulder/ts-vue-class-component
Object (working): https://github.com/pcmulder/ts-vue-class-component/tree/object
Is there anything I'm missing or not getting?
The text was updated successfully, but these errors were encountered: