Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Forked from sourvb/application.controller.js
Last active December 19, 2015 15:43
Show Gist options
  • Select an option

  • Save rwjblue/d08bce4cbe89828d54d2 to your computer and use it in GitHub Desktop.

Select an option

Save rwjblue/d08bce4cbe89828d54d2 to your computer and use it in GitHub Desktop.
issue #12713
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Knock knock!',
userName: 'Emberman'
});
<h1>{{appName}}</h1>
<br>
<br>
{{my-component name=userName}}
<br>
<br>
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
getName: function() {
alert(this.get('name'));
}
}
});
<button {{action "getName"}}>Who is this?</button>
{
"version": "0.4.17",
"EmberENV": {
"FEATURES": {}
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.1.0",
"ember-template-compiler": "2.1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment