-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
inject the router service inside ember-router #19454
Conversation
Conceptually this seems good to me also, does it pass tests? What do you think @Ravenstine @snewcomer? |
Unless I missed something, they pass locally. Thanks to @Ravenstine for writing it :) in his PR. |
Co-authored-by: Ten Bitcomb <[email protected]>
8b693c0
to
7ed24c0
Compare
@sly7-7 This seems like a close direct copy with some modifications. Why don't we continue with comments and iterate on @Ravenstine's PR? |
Either is fine, @sly7-7 was using the |
OK, so looks like this strategy definitely works. @Ravenstine - Think you can incorporate this into #19405? |
@snewcomer Actually, I didn't understand all the things done in #19405. At first I wanted to cherry-pick the commit of the test, but I realized it was in the same. So just by laziness and simplicity for me to try that out, I had copied the test, and I'm sorry, because I didn't realize the overall PR was so close to the other. I apologize it was seen as a copy/paste. |
That certainly is my fault for making that assumption and I sincerely apologize! So the only difference is Ben's throws an error if the router svc isn't available whereas yours fails gracefully. We weren't sure which approach is preferred but throwing the error caught a few tests that needed to https://github.com/emberjs/ember.js/pull/19405/files#r575540397 |
@snewcomer There is no problem at all :) After all, we just wanted the same thing, to move this issue forward :) I've commented in #19405, because I think there is a mistake with the For the nullish thing, I have no idea what should be preferred, I've just adapt the code to make tests pass without changing them. But ultimately, talking with @rwjblue it seems that this https://github.com/emberjs/ember.js/pull/19454/files#diff-02300d4f8ddd433fa4571addf26231e52255efd632d0b9972b02086584bf15ccR172 should be removed. He told me it was here only because of tests. |
Related #19405 (maybe replace?)
I don't know if it's the right way, and feel maybe weird.
cc/ @Ravenstine @rwjblue