Generic utilities for use with Angular JS.