I have a native JavaScript class:
var Holder = new function(elements) {
this.elements = elements;
this.any
You could return a class with a factory
.factory('Holder', function() {
return (function (){
this.foo = foo;
this.bar = bar;
});
});
Now to use it
.controller('AnyController', ['Holder', function (Holder) {
var holder = new Holder();
}]);
EDIT
Use a factory
instead of a service
, as suggested in the comments