-
-
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
[DOC release] Expand Route#render options documentation #5135
Conversation
Which came originally from #4477. |
Would you mind marking as |
Is there a list of those somewhere? http://emberjs.com/guides/contributing/adding-new-features/ and https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md don't mention them. |
You are correct, the contributing guide should be updated to include the prefix listing. Here is the listing along with a little bit of info on each in the following slides: https://speakerdeck.com/rwjblue/contributing-to-ember?slide=41 |
// posts route | ||
Ember.Route.extend({ | ||
renderTemplate: function(controller, model){ | ||
this.render('posts', { // the template to render, referenced by name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you supply a view in the options hash, isn't the template associated with that view used instead of the "string identifier" ('posts')?
I can vaguely recall that tripping me up in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you specifically supply templateName
to view, which is pretty old school for 1.0 which reversed the view/template relationship: http://emberjs.jsbin.com/yuqesulo/1/
That continues to work to not break older apps, but isn't mentioned much.
This also updates it to reflect the additional `model` param you can pass (enabled since 33a9891)
[DOC release] Expand Route#render options documentation
This also updates it to reflect the additional
model
param you can pass(enabled since 33a9891)