AngularJS autocomplete with services through dependency injection

We have several custom services in our angularJS app.  We inject these services through DI into our controllers.  When we go to try and use autocomplete on this, it doesn't push the properties up to the top, rather it includes them in a generic, alphabetical list thrown in with all the other service's properties including vanilla JS object functions.  

Is it possible to get services injected like this to have their properties show up at the top of the autocomplete suggestion list after typing the first '.' operator?  If I add a return object to the service and manually add func1() to the object, the autocomplete will work as expected, but we'd like to keep that extra bit of bloat out of the code base.

Our code looks like this:

AppModule.service('CustomService', function() {
this.func1 = function() {};
});

AppModule.directive('custDirective', function() {
return {
controller: function(CustomService) {
'ngInject';

CustomService. //Would like to see func1 at the top of the autocomplete suggestions.
}
};
});

 

Please sign in to leave a comment.