Recently I faced a common task: upload user files (photos) with some data (newly created record) attached. So I needed an ajax uploader with following features: Uploading few files in one…
How to: Handle backend errors in Ember.js properly
Today I want to talk about a very interesting topic: how to handle errors that happens on backend. These may include database errors, validation errors, server faults, etc. There are…
JavaScript tip: an easy way to copy objects
Let’s say you have some object, and want to made a “backup” before modifying it. The easiest way to do this is to use JSON.stringify and JSON.parse. First function serializes…
Ember.js tip: A helper to combine conditions in {{#if}} blocks
If you tried Ember.js, you may have noticed that it is not possible to use logical operators in templates. For example, such template will not work: {{#if (param1 || param2)}} Will…
How to: Create a multi-lingual application with locale-prefixed URLs in Ember.js
In this tutorial I want to show how to create a multi-lingual application with URLs, containing locale, and with possibility to detect a locale from browser settings. We will use: ember, ember-cli and ember-i18n.