Skip to content
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

Support namespaced references in resolver #1679

Closed
wants to merge 1 commit into from

Conversation

joefiorini
Copy link
Contributor

  • Requires separating namespace components with "/"
  • Assumes it can access all components using normal "." notation

This enables us to reference namespaced routes using the new routing syntax. So we can support all of:

App.IndexRoute => match("/").to("index")
App.Users.IndexRoute => match("/users").to("users/index")

- Requires separating namespace components with "/"
- Assumes it can access all components using normal "." notation
@joefiorini joefiorini mentioned this pull request Jan 4, 2013
@trek
Copy link
Member

trek commented Jan 6, 2013

Could you add some tests? I don't think this will get merged without tests.

@joefiorini
Copy link
Contributor Author

I could not find tests around this behavior so I wasn't sure what to write. Where would these tests go? Application or Container?

On Jan 6, 2013, at 7:31 AM, Trek Glowacki notifications@github.com wrote:

Could you add some tests? I don't think this will get merged without tests.


Reply to this email directly or view it on GitHub.

@darthdeus
Copy link
Member

This would be so sweet, +1

@tchak
Copy link
Member

tchak commented Jan 7, 2013

Do we really want this? App.Users is not a real namespace in sens of Ember (we do not support nested namespaces). When people will se this, they will try App.Models.User, and it will not work because Models can not be a namespace and toString method will not work and models will get bad urls... People will cry... I am already crying...

@tchak
Copy link
Member

tchak commented Jan 7, 2013

👎

@joefiorini
Copy link
Contributor Author

Then I guess the real question is why doesn't Ember support nested namespaces (in the Javascript sense, not Ember namespaces)?

On Jan 7, 2013, at 6:02 PM, Paul Chavard notifications@github.com wrote:

Do we really want this? App.Users is not a real namespace in sens of Ember (we do not support nested namespaces). When people will se this, they will try App.Models.User, and it will not work because Models can not be a namespace and toString method will not work and models will get bad urls... People will cry... I am already crying...


Reply to this email directly or view it on GitHub.

@wycats
Copy link
Member

wycats commented Jan 8, 2013

We have other plans for nested namespaces. We'll revisit this once the dust settles from all the current router changes.

@wycats wycats closed this Jan 8, 2013
@joefiorini
Copy link
Contributor Author

Cool, thanks @wycats. The whole "Ember namespaces are not real namespaces" thing is fairly confusing, so I'm looking forward to seeing what you come up with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants