Tag: Ember

In a long-running app such as you might build in Ember, it can be useful to detect when the window is closing. This is easily detected with JavaScript, and there are easy places to put the code in your Ember app.

In Ember, your state is separated from the UI inside models. But, often you want the state of your models to be represented visually in the UI via dynamic class names. Make it happen with Ember.Views.

Ember Views are used for event handling and creating reusable web components. To make them useful and interesting, model data needs to make it into and out of the view. Here is an example of how this works.

In CoffeeScript there are two different types of arrows for defining functions: arrow (->) and fat arrow or hash rocket (=>). Usually, you’ll use the regular arrow. But sometimes you’ll want the special behavior of the fat arrow.

Ember makes use of the wonderful Handlebars templates. These templates, in order to be performant, must be precompiled. Based on the Ember docs, it’s not abundantly clear how this is to happen. Here’s a solution that works well.