Skip to content

Instantly share code, notes, and snippets.

@bsylvain
Created August 2, 2018 13:57
Show Gist options
  • Save bsylvain/2920719d280655f60684f37bfebc4e87 to your computer and use it in GitHub Desktop.
Save bsylvain/2920719d280655f60684f37bfebc4e87 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
theValue: 'the Text Value',
actions:{
getText(arg){
return arg+'_yay'
}
}
});
<h1>Text action</h1>
<br>
<br>
{{use-text text= (get getText theValue)}}
<br>
<br>
<p>Before</p>
{{text}}
<p>After</p>
{
"version": "0.15.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.2.2",
"ember-template-compiler": "3.2.2",
"ember-testing": "3.2.2"
},
"addons": {
"ember-data": "3.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment