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
Having two template names, one plural one singular, ignores plural #14944
Comments
@Alonski it may be worth sharing a work around example as well. I see the issue in the ember-twiddle example you provided, this looks like a bug. |
@pixelhandler Hey my workaround was renaming template.hbs to template-single.hbs. Then in the tenplateRoute I have templateName: template-single.hbs. |
This is likely related to pods. |
@locks To clarify I am not using pods in my App. |
@Alonski the thing is that the resolver supports both structures at the same time, and as far as I know there's no way to "turn it off", so indirectly you are using pods ;x What I think is happening here, since you don't have a "pod module prefix" set, it falls back to The good news is that the module unification structure should not suffer from these kinds of ambiguity. |
@Alonski yeah I was suspicious of the name |
@pixelhandler I'm not sure this should be closed. Maybe add a workaround in the CLI so you can't create templates named template.hbs |
I have two different routes:
This also generated two templates:
When I go to the templates route. Ember tries to render the template.hbs template.
Trying to use templateName or renderTemplate() doesn't work.
// app/routes/templates.js export default Ember.Route.extend({ templateName: "templates", renderTemplate() { this.render("templates"); } });
Here is a twiddle made by @gmarquet
https://ember-twiddle.com/c3f1c16b8fb0ca56248b767a09acd3c9?openFiles=twiddle.json%2C&route=%2Ftemplates
Got around this currently by renaming the template.hbs to something else and using templateName to set the name for the the template route
The text was updated successfully, but these errors were encountered: