Skip to content

Instantly share code, notes, and snippets.

@mydea
Last active February 20, 2019 15:11
Show Gist options
  • Save mydea/bcbd6e1055c6dc6dc4351fbeea9d81cf to your computer and use it in GitHub Desktop.
Save mydea/bcbd6e1055c6dc6dc4351fbeea9d81cf to your computer and use it in GitHub Desktop.
Angle bracket vs. Curly brace values
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
value: 'default value'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<div>
No value (curly): {{test-component}}
</div>
<div>
With value (curly): {{test-component value='my value'}}
</div>
<div>
No value (angle): <TestComponent />
</div>
<div>
With value (angle): <TestComponent @value='my value' />
</div>
{
"version": "0.15.1",
"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.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment