This is not really an Ember tip but still very good to know. You don’t have to write ugly code for string concatenation any more.
Old Way:
1 |
"My name is " + firstName + " " + lastName + " and I am " + age + " years old." |
New Way (note the forward tick instead of single or double quote):
1 |
`My name is ${firstName} ${lastName} and I am ${age} years old.` |
This is possible thanks to ES2015/ES6 and you can learn more about it over here. This works out-of-the-box in your ember cli project because of ember-cli-babel package.