Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Named Positional Parameters
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
currentBooleanValue: true,
actions: {
toggleIf() {
return false;
<h1>Welcome to {{appName}}</h1>
{{#my-if currentBooleanValue}}
This is true
{{ else }}
This is false
<button {{action 'toggleIf'}}>
Toggle if
import Ember from 'ember';
const { computed } = Ember;
const MyIfComponent = Ember.Component.extend({
positionalParams: ['predicateValue']
export default MyIfComponent;
{{#if predicateValue}}
{{ else }}
{{yield to="inverse"}}
"version": "0.4.17",
"EmberENV": {
"dependencies": {
"jquery": "",
"ember": "",
"ember-data": "",
"ember-template-compiler": ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.