I'm facing a very annoying issue. How can I access the public module function from inside a private module pattern? I've left a comment on the problematic line...is there any workaround for this?
angular.module("myApp").factory('models', [function () {
function itemModel(dtoItem) {
this.type = dtoItem.type;
}
function groupModel(dto) {
this.items = [];
angular.forEach(dto.getFeatures(), function (item) {
self.items.push(new itemModel(item)); //I need to change this line to self.items.push(new ItemModel(item)); in order to run an external test and check the type of the 'items'
});
}
return {
ItemModel: itemModel,
GroupModel: groupModel
}
}]);