Last active
August 29, 2015 14:25
-
-
Save shenst1/bd89f220f8b626928185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this controller is not being used because i am on the wrong route. | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
isEditing: false, | |
actions: { | |
editRecord() { | |
this.set('isEditing', true); | |
} | |
} | |
}); |
Looks like you might want an Item Controller although be aware that this will be phased out in Ember 2.0. Instead you could delegate to a component.
{{#each model.records as |record|}}
{{record-display record=record}}
{{/each}}
See this thread for discussion: Good way to do this in Ember 2.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to set the
isEditing
property on myrecord
model from a template that isn't the record.hbs template. The view I have my records in is in the type template. Therefore, the controller is type.js and setting theisEditing
property would effect all records, not just one. How do I make it so my record list uses the record controller so that each item has its ownisEditing
property? Is the only way to create an outlet and add a new route/template/controller? I would like to avoid changing the url.