Last active
March 26, 2017 18:48
-
-
Save kumkanillam/0e41054382b29643a7785c1536308d48 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.Component.extend({ | |
didUpdateAttrs(){ | |
console.log('didUpdatte'); | |
}, | |
didReceiveAttrs(){ | |
this._super(...arguments) | |
console.log('didRecieve'); | |
}, | |
willUpdate(){ | |
console.log('willupdate'); | |
}, | |
didRender(){ | |
console.log('didRender'); | |
}, | |
actions:{ | |
add(){ | |
//this.get('model').pushObject(4); | |
this.sendAction('add',4); | |
} | |
} | |
}); |
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.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init(){ | |
this._super(...arguments); | |
this.set('contArr',[50,51]); | |
}, | |
actions:{ | |
add(val){ | |
//this.get('contArr').pushObject(52); | |
this.get('model').pushObject(4); | |
//this.get('model').clear(); | |
//let a =[11,222]; | |
//this.set('model',a); | |
} | |
} | |
}); |
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({ | |
init(){ | |
this._super(...arguments); | |
this.set('result',[1,2,3]); | |
}, | |
model(){ | |
return this.get('result'); | |
} | |
}); |
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.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment