I have an app with a service which wraps my API calls:
var ConcernService = { ... get: function (items_url, objId) { var defer = $q.defer();
You can also try something like this and see if it works for you. You may need to adjust to your needs:
.state('otherwise', { abstract: true, templateUrl: 'views/404.html' }) .state('otherwise.404', { url: '*path', templateUrl: 'views/404.html' })