Fix component template lookup with pods.#53
Conversation
Previously to use the pods structure for a component, you would have to define your template in `app-prefix/components/my-pod-name/template`, which is not what is expected naturally. This change fixes that so that it looks up a components template in `app-prefix/my-pod-name/template`.
|
If your pod has a view and a component this is vague. Maybe component.hbs and template.hbs? |
|
@stefanpenner - Unfortunately, Generally speaking, a component is a unique named thing in the system not a standard application domain concern (like a route/controller/view/template combo). I do not think that it is a normal (or a good idea) to share route/controller/view names with a component. |
|
👍 |
|
i guess if you really want to have a view and a component together using the same name, it might be better to name the component differently, maybe: view component |
|
Alternatively, I could make the components template be at |
|
we can do magic re: component.hbs unsure if we should |
|
so its basically view or component, but not both.. I think i can live with that. (i assume i will regret saying this) [Edit: thanks @williamli ] |
|
@stefanpenner u meant view or component, but not both right? |
|
We can go with this as is, or tweak it a bit more so that the template is looked up in @stefanpenner - Thoughts? |
…uck-less Fix component template lookup with pods.
|
This broke my application, and I'm not sure what the change does. My components are currently the only thing in my application utilizing the pod structure, so I want to put all my components in the app/components directory. How do I modify my structure to work with this change? |
|
@lsdafjklsd i don't think these code have been rolled out yet. but the changes were documented here: #30 |
Implement a noConflict mode for the loader
Previously to use the pods structure for a component, you would have to define your template in
app-prefix/components/my-pod-name/template, which is not what is expected naturally.Now a components template is looked up in
app-prefix/my-pod-name/template.Fixes #30.
This is backwards incompatible for folks that were previously relying on the silly module name. In theory I can make it work either way, but I doubt that is a big issue (who would choose to use that naming?).