AngularJS Radio Track by Directive

In this post I'll explain and demonstrate a directive I've written which allows you to use similar behaviour of the "track by" options we are given in select lists in AngularJS with radio buttons. AngularJS does change tracking on any object which is assigned to a scope. Every time it examines our objects and looks for changes is called a "Digest Cycle". AngularJS uses "dirty checking" to check if our objects have changed. In an »

$q.all() - Combining promises in AngularJS

Using $q.all() in AngularJS couldn't be simpler. $q is an Angular Service which facilitates running functions asynchronously. It's based on a library (Q) by Kris Kowal. $q.all() allows us to wait on an array (or object) of promises, $q.all() will combine these into a single promise. One Promise The returned promise abides by the following two rules: If one promise in the array fails, the combined promise fails If all promises succeed, »

AngularJS putting a template in the $templateCache

This is a quick post about getting a template in the $templateCache. A SPA (Single Page Application) I'm building at work, consists of 4 "views". We expect the users to be on this page for a good while (anything from 5 mins upwards). The threat of losing internet connectivity is a real one and would render our application useless (we regularly call out to a JSON API to update results on the user's request). I've »

Upload to Amazon S3 using AngularJS

In this post I’m going to detail the steps to upload to Amazon S3 using angularJS. A friend contacted me as he needed a simple way for his users to upload large (GBs) files to his Amazon S3 bucket. Before, he was using a mix of dropbox sharing via and manually uploading once he has possession of the files. Obviously this doesn’t scale the more users who are trying to upload files – he »