Skip to content

Commit

Permalink
Document setupController hook behavior further
Browse files Browse the repository at this point in the history
The default implementation doesn't update the `model` property of the controller
if the resolved model is undefined.  This isn't currently documented.
  • Loading branch information
Bestra committed Mar 3, 2017
1 parent b0555ba commit e9f6500
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ember-routing/lib/system/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,8 @@ let Route = EmberObject.extend(ActionHandler, Evented, {
model supplied by the `model` hook.
By default, the `setupController` hook sets the `model` property of
the controller to the `model`.
the controller to the `model`. If `model` is `undefined`, the default
implementation will _not_ update the `model` property of the controller.
If you implement the `setupController` hook in your Route, it will
prevent this default behavior. If you want to preserve that behavior
Expand Down

0 comments on commit e9f6500

Please sign in to comment.