rockandrollwithemberjs / rarwe-issues

Errata and updates for the Rock and Roll with Ember.js book
https://rockandrollwithemberjs.com
43 stars 4 forks source link

Page 139 I can't get the controller to reset #456

Closed lenoraporter closed 4 years ago

lenoraporter commented 4 years ago

I put the resetcontroller logic in app/controller/bands/band/songs.js but it doesn't work. The example is stating it goes in app/routes/bands/band/songs.js but I don't believe we created a bands/bands/songs.js file in routes.

I'm using version 20200120.

balinterdi commented 4 years ago

Hey Lenora,

resetController is a route hook, so it should definitely go in app/routes/bands/band/songs.js. We created that file manually in the Nested routes chapter, page 60:

Screenshot 2020-05-20 at 22 43 13
lenoraporter commented 4 years ago

Ahh! I must've missed this step. Thanks Balint!

lenoraporter commented 4 years ago

Just tried it. It works!