Templates.helpers.if()

ifpublic Defined in packages/ember-htmlbars/lib/helpers/if_unless.js:9 Use the if block helper to conditionally render a block depending on a property. If the property is "falsey", for example: false, undefined, null, "", 0, NaN or an empty array, the block will not be rendered. {{! will not render if foo is falsey}} {{#if foo}} Welcome to the {{foo.bar}} {{/if}} You can also specify a template to show if the property is falsey by using the else helper. {{! is it raining outside?}} {{#if

Templates.helpers.each-in()

each-inpublic Defined in packages/ember-htmlbars/lib/helpers/each-in.js:8 Available since 2.1.0 The {{each-in}} helper loops over properties on an object. It is unbound, in that new (or removed) properties added to the target object will not be rendered. For example, given a user object that looks like: { "name": "Shelly Sails", "age": 42 } This template would display all properties on the user object in a list: <ul> {{#each-in user as |key value|}} <li>{{key}}: {{value}}

Templates.helpers.get()

getpublic Defined in packages/ember-htmlbars/lib/keywords/get.js:105 Available since 2.1.0 Dynamically look up a property on an object. The second argument to {{get}} should have a string value, although it can be bound. For example, these two usages are equivilent: {{person.height}} {{get person "height"}} If there were several facts about a person, the {{get}} helper can dynamically pick one: {{get person factName}} For a more complex example, this template would allow the user to switc

Templates.helpers.each()

eachpublic Defined in packages/ember-htmlbars/lib/helpers/each.js:9 The {{#each}} helper loops over elements in a collection. It is an extension of the base Handlebars {{#each}} helper. The default behavior of {{#each}} is to yield its inner block once for every item in an array passing the item as the first block parameter. var developers = [{ name: 'Yehuda' },{ name: 'Tom' }, { name: 'Paul' }]; {{#each developers key="name" as |person|}} {{person.name}} {{! `this` is whatever it was

Templates.helpers.hash()

hash (options) Objectpublic Defined in packages/ember-htmlbars/lib/helpers/hash.js:6 Use the {{hash}} helper to create a hash to pass as an option to your components. This is specially useful for contextual components where you can just yield a hash: handlebars {{yield (hash name='Sarah' title=office )}} Would result in an object such as: js { name: 'Sarah', title: this.get('office') } Where the title is bound to updates of the office property. Parameters: options Object Retu

Templates.helpers.debugger()

debuggerpublic Defined in packages/ember-htmlbars/lib/keywords/debugger.js:10 Execute the debugger statement in the current template's context. {{debugger}} When using the debugger helper you will have access to a get function. This function retrieves values available in the context of the template. For example, if you're wondering why a value {{foo}} isn't rendering as expected within a template, you could place a {{debugger}} statement and, when the debugger; breakpoint is hit, you can a

Templates.helpers.concat()

concatpublic Defined in packages/ember-htmlbars/lib/helpers/concat.js:6 Available since 1.13.0 Concatenates input params together. Example: handlebars {{some-component name=(concat firstName " " lastName)}} {{! would pass name="<first name value> <last name value>" to the component}}

Templates.helpers.component()

componentpublic Defined in packages/ember-htmlbars/lib/keywords/component.js:11 Available since 1.11.0 The {{component}} helper lets you add instances of Ember.Component to a template. See Ember.Component for additional information on how a Component functions. {{component}}'s primary use is for cases where you want to dynamically change which type of component is rendered as the state of your application changes. The provided block will be applied as the template for the component. Given a

Templates.helpers

Ember.Templates.helpers Class Module: ember-templates

TargetActionSupport

Ember.TargetActionSupport Class PRIVATE Extends: Ember.Mixin Defined in: packages/ember-runtime/lib/mixins/target_action_support.js:12 Module: ember-runtime Ember.TargetActionSupport is a mixin that can be included in a class to add a triggerAction method with semantics similar to the Handlebars {{action}} helper. In normal Ember usage, the {{action}} helper is usually the best choice. This mixin is most often useful when you are doing more complex event handling in View objects. See also