I am new to Ember and the assignment I am working on is using 1.11 version already. I used to work on Angular and am finding myself confused with some concepts here in Ember. Read that Controller is used for logic and deals with data whereas Component (js) deals with the behavior of component
So, the doubt I have is
1) Where should i be doing my DOM manipulation
2) In case I need to modify/play my json data, after I get from server is controller the right place or the respective component?
1) Where should i be doing my DOM manipulation
If you are able to move this to component (when designing your logic) it would be definitely more appropriate place than controller.
2) In case I need to modify/play my json data, after I get from server is controller the right place or the respective component?
Best solution would be to fire actions from components and those actions should be handled in controller where you can manipulate your JSON that you probably obtain in routes and pass it along to controllers via model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With