Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Controller.extend({
- appName: 'Ember Twiddle',
- counter: 0,
- myArray: Ember.A([1,2,3,4,5]),
- actions: {
- remove() {
- console.log('Removing: ', this.myArray);
- this.get('myArray').popObject();
- },
- add() {
- console.log('Adding: ', this.myArray);
- this.get('myArray').pushObject(this.counter++);
- }
- }
- });
Add Comment
Please, Sign In to add comment