So I have searched the web up and down and can't find anything about this. Basically I have tried many different times to use the afterModel
hook in routes to no avail because it hangs the application.
First use case was to prevent users from going to routes that were not permissible during certain situations. This worked fine, I aborted the transition no problem. The problem is when the conditions of those if statements are NOT true and the hook is expected (by me) to just exit and then render the page. Nothing happens. Just sits there forever.
This is something where doesn't matter what code I have in there, it simply does not work.
This:
afterModel: function(model, transition) {
},
Locks up the app. I could find nothing on any tutorial or definition of afterModel that specifies requiring you to return anything though I've seen examples where they've returned something.
beforeModel
doesn't have this problem.
Aucun commentaire:
Enregistrer un commentaire