@Zorig wrote:
Hi guys, I have been wondering if my approach is right or wrong. I got one component for editing and creating. Eg:
place-form
component. So in order to edit i passisUpdate
prop to component like{{place-form isUpdate=true}}
and in action i check if is update it’s editing, or it’s creating. I saw some people create route callednew
andedit
hence when user visit toedit
route on model hook it wasthis.store.createRecord('place')
and set props in template file such asmodel.set('title', 'lOrem ipsum')
but is it really right approach??
Posts: 4
Participants: 3