Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

fixed groupBy 10 () Error #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions angular-underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
};
}]);

// simplify custome overriding on angular side
var
adapFunc = {
'groupBy': _.memoize(function (collection, param) {
return _.groupBy(collection, param);
})
};

// end custom _


Expand All @@ -73,8 +81,7 @@
});

// end register angular-underscore/utils



// begin register angular-underscore/filters

var
Expand Down Expand Up @@ -138,7 +145,7 @@
}

var
filter = _.bind(_[filterNames[0]], _),
filter = _.bind(adapFunc[filterNames[0]] ? adapFunc[filterNames[0]] : _[filterNames[0]], _),
filterFactory = function() {return filter;};

_.each(filterNames, function(filterName) {
Expand All @@ -153,5 +160,6 @@
});

// end register angular-underscore/filters


}(angular, _));
2 changes: 1 addition & 1 deletion angular-underscore.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions angular-underscore.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.