Skip to content

Instantly share code, notes, and snippets.

@mohamedali-s-4725
Created November 30, 2016 11:57
Show Gist options
  • Save mohamedali-s-4725/24f0ef6c871b1a1cae42446c945c3258 to your computer and use it in GitHub Desktop.
Save mohamedali-s-4725/24f0ef6c871b1a1cae42446c945c3258 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
didInitAttrs(options) {
console.log('didInitAttrs', options, this.get('data'));
},
didUpdateAttrs(options) {
console.log('didUpdateAttrs', options, this.get('data') );
},
willUpdate(options) {
console.log('willUpdate', options, this.get('data'));
},
didReceiveAttrs(options) {
console.log('didReceiveAttrs', options, this.get('data'));
},
willRender() {
console.log('willRender', this.get('data'));
},
didRender() {
console.log('didRender', this.get('data'));
},
didInsertElement() {
console.log('didInsertElement', this.get('data'));
},
didUpdate(options) {
console.log('didUpdate', options, this.get('data'));
},
willInsertElement(options) {
console.log('willInsertElement', options, this.get('data'));
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
data: 'sma',
data1: '111'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
DATA : {{input value=data}}
<br>
<br>
DATA_1 : {{input value=data1}}
{{my-component data=data data1=data1}}
{{outlet}}
<br>
<br>
{
"version": "0.10.6",
"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.9.0",
"ember-data": "2.9.0",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment