home
  • Blog
1.10
  • Getting Started
  • Getting Ember
  • Concepts
  • The Object Model
  • Application
  • Templates
  • Routing
  • Components
  • Controllers
  • Models
  • Views
  • Enumerables
  • Testing
  • Configuring Ember.js
  • Cookbook
    • Introduction
    • Contributing
    • User Interface and Interaction
      • Introduction
      • Adding CSS Classes to Your Components
      • Adding CSS Classes to Your Components Based on Properties
      • Focusing a Textfield after It's Been Inserted
      • Displaying Formatted Dates With Moment.js
      • Specifying Data-Driven Areas of Templates That Do Not Need To Update
      • Using Modal Dialogs
      • Resetting scroll on route changes
    • Event Handling & Data Binding
    • Helpers & Components
    • Working with Objects
  • Understanding Ember.js
  • Contributing to Ember.js
Old Guides - You are viewing the guides for Ember v1.10.0.
Go to v5.0.0

Specifying Data-Driven Areas of Templates That Do Not Need To Update

Edit pencil

Problem

You have a section of a template that is based on a data but you don't need the template to update

Solution

Use the {{unbound}} Handlebars helper.

{{unbound firstName}}
{{lastName}}

Discussion

By default all uses of Handlebars helpers in Ember.js will use data bound values that will automatically update the section of the template where a property changes after initial rendering. Ember.Handlebars does this by applying the {{bind}} helper automatically for you.

For example, the two following uses of Handlebars are identical in an Ember.js application:

{{lastName}}
{{bind lastName}}

If you know that a property accessed in Handlebars will not change for the duration of the application's life, you can specify that the property is not bound by applying the {{unbound}} helper. A property that is not bound will avoid adding unnecessary observers on a property.

Example

JS Bin

left arrow
Displaying Formatted Dates With Moment.js
Using Modal Dialogs
right arrow
On this page

  • Problem
  • Solution
  • Discussion
  • Example
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2023 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue