Updated to support Angular-1.2.0