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

Remove templateName and renderTemplate documentation #1445

Merged
merged 3 commits into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
language: node_js
node_js:
- '12'
- '12.16.1'

dist: trusty

Expand Down
14 changes: 0 additions & 14 deletions guides/release/routing/rendering-a-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,3 @@ Each template will be rendered into the `{{outlet}}` of its parent route's
template. For example, the `posts.new` route will render its template into the
`posts.hbs`'s `{{outlet}}`, and the `posts` route will render its template into
the `application.hbs`'s `{{outlet}}`.

If you want to render a template other than the default one, set the route's [`templateName`](https://api.emberjs.com/ember/release/classes/Route/properties/templateName?anchor=templateName) property to the name of
the template you want to render instead.

```javascript {data-filename=app/routes/posts.js}
import Route from '@ember/routing/route';

export default class PostsRoute extends Route {
templateName = 'posts/favorite-posts';
}
```

You can override the [`renderTemplate()`](https://api.emberjs.com/ember/release/classes/Route/methods/renderTemplate?anchor=renderTemplate) hook if you want finer control over template rendering.
Among other things, it allows you to choose the controller used to configure the template and specific outlet to render it into.