Created
December 29, 2015 12:32
-
-
Save amacgregor/d095165fe3ff1b4fb830 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
| import Ember from 'ember'; | |
| export default Ember.Route.extend({ | |
| model() { | |
| return this.store.findAll('entry'); | |
| }, | |
| isExpanded: false, | |
| actions: { | |
| expand() { | |
| this.controller.set('isExpanded', true); | |
| }, | |
| contract() { | |
| this.controller.set('isExpanded', false); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe that in this case the problem comes from your
isExpandedproperty.You have that property referenced in your
routewhen your template can only access properties from this same route'scontroller.So I see two solutions:
component<- preferred solutionIf you haven’t used a component before I recommend to start from here https://guides.emberjs.com/v2.2.0/components/defining-a-component/