Skip to content

Commit

Permalink
Merge pull request #511 from bwbuchanan/doc/add-error-substate-model-…
Browse files Browse the repository at this point in the history
…note

Closes #460
  • Loading branch information
dfreeman committed Jan 4, 2023
2 parents 1762f53 + fbf09e7 commit 3339718
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/ember/routes-and-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ export default class MyRoute extends Route {
{{this.model}} {{! MyModelType }}
{{@model}} {{! MyModelType }}
```

For `error` substate routes, the type of `{{@model}}` will not be automatically inferred. You will need to create a backing class for the route if you consume its model in the corresponding template:

```typescript
export default class ErrorRoute extends Route<Error> {
// ...
}
```

<!-- prettier-ignore -->
```handlebars
{{@model}} {{! Error }}
```

0 comments on commit 3339718

Please sign in to comment.