ga-wdi-boston / ember-components

Other
0 stars 98 forks source link

Reason for `index` route and not `lists` route? #9

Open payne-chris-r opened 8 years ago

payne-chris-r commented 8 years ago

Hey @gaand it looks like you've modified this to create an index route instead of a lists route. I kind of think it should be lists so that we know what data is getting pulled in by the model hook. Arguments? Reason for changing? Beuler?

jrhorn424 commented 8 years ago

Where do you see this change @payne-chris-r? I talked with @gaand briefly about this, but I'd like to see the code to make sure we're all on the same page.

payne-chris-r commented 8 years ago

Code-Along: Create Listr Index Route

We'll need to generate the application index route and create some list data.

ember generate route index
//index/route.js
import Ember from 'ember';
...

NOT:

ember generate route lists
gaand commented 8 years ago

I actually think this should be lists.index, but I didn't get there. Perhaps this is related to #7 ?

jrhorn424 commented 8 years ago

@gaand Thanks. Can we flesh this out more? I'd like to know your thoughts on the user flow through these routes.

For now, I've advised @payne-chris-r to use index as a landing page, and that template just has a welcome message and a link to the lists route.

gaand commented 8 years ago

From slack: [1:23]

The lists route should have an explicit index because reasons.

[1:24]
Kidding, it should have an explicit route because it makes having other associated routes cleaner.

[1:25]
So, /lists goes to the lists.index route, /lists/new goes to the lists.new route. This also helps with /list/:id and /list/:id/edit etcetera.