Inject $q for AngularJS promises