Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4837

How you guys manage create or edit data with one component

$
0
0

@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 pass isUpdate 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 called new and edit hence when user visit to edit route on model hook it was this.store.createRecord('place') and set props in template file such as model.set('title', 'lOrem ipsum') but is it really right approach??

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4837

Trending Articles