AngularJS utilities