Last active
June 21, 2018 09:34
-
-
Save acestudiooleg/6477927a8ea2347c5168322e976bc9cf to your computer and use it in GitHub Desktop.
Array example
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'; | |
| import EmberObject from '@ember/object'; | |
| const myArr = [1,2,3,4,5].map(i => EmberObject.create({name: 'Name'+i, age: (i+1)*10})); | |
| const someData = { | |
| myArr | |
| }; | |
| export default Ember.Controller.extend({ | |
| someData, | |
| appName: 'Ember Twiddle', | |
| actions: { | |
| plusTen(el){ | |
| console.log(el); | |
| el.set('age', el.age+10); | |
| //set(el, 'age', age+10); | |
| } | |
| } | |
| }); |
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
| { | |
| "version": "0.14.1", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
| "ember": "2.18.2", | |
| "ember-template-compiler": "2.18.2", | |
| "ember-testing": "2.18.2" | |
| }, | |
| "addons": { | |
| "ember-data": "2.18.2" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment