Last active
June 22, 2016 07:38
-
-
Save prudvi/996f6408266af8cd4d3372bed8e8331c to your computer and use it in GitHub Desktop.
New Twiddle
This file contains 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({ | |
tagName: "input", | |
isChecked: false, | |
attributeBindings: ['type', 'checked'], | |
type: 'checkbox', | |
checked: function() { | |
return this.get('isChecked'); | |
}.property('isChecked'), | |
click: function() { | |
console.log(this.set('checked', this.$().prop('checked'))); | |
// console.log(':::::::', this.get('targetObject')); | |
this.get('targetObject').send('actionCall', 'I am calling'); | |
} | |
}); |
This file contains 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', | |
actions: { | |
actionCall: function(val) { | |
alert(val); | |
} | |
} | |
}); |
This file contains 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'; | |
var checkboxItems = [{id : 1, isCheked: true},{id : 2, isCheked: false},{id : 3, isCheked: false},{id : 4, isCheked: true}] | |
export default Ember.Route.extend({ | |
model(){ | |
return checkboxItems; | |
} | |
}); |
This file contains 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.9.3", | |
"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.6.0", | |
"ember-data": "2.6.1", | |
"ember-template-compiler": "2.6.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment