Closed adriatic closed 7 years ago
you already had a contact-detail.js, but no view (contact-detail.html).
I created contact-detail.html with the HTML you provided and that made it work.
When you click on a contact from the list, the route changes because of the route-href
this triggers the following route (which in app.js):
config.map([
{ route: '', moduleId: 'no-selection', title: 'Select'},
{ route: 'contacts/:id', moduleId: 'contact-detail', name: 'contacts'} <------
]);
This triggers aurelia to load contact-detail (.js and .html) in the <router-view>
that's in app.html.
There is a slight chance for a misunderstanding here, so please bear with me for a little while more.
The application in question is Rob's tutorial, which has several "typos / omissions" that I would like to solve without telling him about them. The code in this repo is written by me following the tutorial, so I need to make references to that tutorial to ensure you get my drift.
As you said, there is the view model (contact-detail.js
) without the matching view (contact-detail.html
).
I created contact-detail.html with the HTML you provided and that made it work.
Where is the contact-detail.html
that you created ?
Look at the tutorial text here and scroll down a couple of pages until you see this
meaning that you did not have to create contact-detail.html
- but rather "include" the code above to the main view (app.html
)
Am I missing something - or you responded without complete understanding of my question?
This view is being updated to show the details of the selected contact. Note that the code for the updated view:
is just a "partial" for the highlighted part of the main view:
meaning that the tutorial needs to be corrected. Rather than pointing Rob to this issue, can you please update this so I can learn how this works (I believe that this should be done using
compose
)