Random thoughts about the world of programming

Concatenated Properties

Jan 27th, 2013

As some of you might now, Ember provides you with something called
concatenated property. Their main use case is internal, which means
you are unlikely to have the need to use them in your own application.
There are some places in Ember where you might be surprised by how
things behave and this might be one of those. Let’s start with an
example.

This must be some sorcery! It seems that classNames aren’t overwritten
in the subclass, but rather concatenated to the superclass’ value of
that property. This works even when you overwrite it in an instance.