@pepper wrote:
Sorry, but I'm pretty new using Ember and I have this kind of dudu... check out this loop:
my view.hbs
{{#each tweet as |model|}} <div>{{tweet.text}}</div> <button class="btn btn-default" {{action "reTweet"}} disabled={{isDone}}>Retweet</button> </div> {{/each}}
my controller.js: import Ember from 'ember';
export default Ember.Controller.extend({ isDone: false, actions: { reTweet: function() { this.set('isDone', true); } } });
And I would like to click some individual button and update the property of that individual element inside that loop. How could I do this?
Posts: 1
Participants: 1