Templates.helpers.unbound()

unboundpublic

Defined in packages/ember-htmlbars/lib/keywords/unbound.js:10

The {{unbound}} helper disconnects the one-way binding of a property, essentially freezing its value at the moment of rendering. For example, in this example the display of the variable name will not change even if it is set with a new value:

{{unbound name}}

Like any helper, the unbound helper can accept a nested helper expression. This allows for custom helpers to be rendered unbound:

{{unbound (some-custom-helper)}}
{{unbound (capitalize name)}}
{{! You can use any helper, including unbound, in a nested expression }}
{{capitalize (unbound name)}}

The unbound helper only accepts a single argument, and it return an unbound value.

doc_EmberJs
2016-11-30 16:53:37
Comments
Leave a Comment

Please login to continue.