Fix $q.when definition
Change my tabs to spaces
Merge pull request #1840 from j201/master

Fix AngularJS $q.when definition