Episode 24
{{#link-to 'posts' (query-params sortAscending=isAscending) }}
{{#outer-expression arg1 (subexpression subArg) }}
//helpers/es-equal.js export default Ember.Handlebars.makeBoundHelper( function(arg1, arg2){ return arg1 == arg2; } ) //something.hbs {{#if (es-equal hatColor 'blue')}} "What a lovely hat!" {{else}} "Have you no taste?" {{/if}}
//helpers/es-and.js export default Ember.Handlebars.makeBoundHelper( function(arg1, arg2){ return arg1 && arg2; } ) //helpers/es-not.js export default Ember.Handlebars.makeBoundHelper( function(arg){ return !arg; } )
{{#if (es-and isSelectedSort (es-not isAscending))}} Highlight up arrow {{else}} Don't highlight up arrow {{/if}}
{{#if (es-and isSelectedSort (es-not isAscending) (car (cdr (list (es-and true false) (es-not false) true))))}} Highlight up arrow {{else}} Don't highlight up arrow {{/if}}
By Jeffrey Biles