Slide 104
Slide 104 text
EMBERCAMP 2016
I CAN WRITE MY APP WITH NO HANDLEBARS
export default Helper.extend({
localesService: inject.service('locales'),
currentLocale: readOnly('localesService.currentLocale'),
compute([key]) {
let currentLocale = get(this, 'currentLocale');
return get(this, 'localesService').lookup(currentLocale, key);
},
localeDidChange: observer('currentLocale', function() {
this.recompute();
})
});