Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Add MapFilter to help with iterating over maps. #931

Closed
wants to merge 1 commit into from

Conversation

mvuksano
Copy link
Contributor

No description provided.

@mvuksano mvuksano added cla: yes and removed cla: no labels Apr 18, 2014
List<_KeyValue<K, V>> call(Map<K, V> inputMap) {
if (inputMap == null) return null;
List<_KeyValue<K, V>> result = [];
inputMap.keys.forEach((K k) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the .keys here. Then the closure args are k, v.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@vicb
Copy link
Contributor

vicb commented Apr 19, 2014

IMO "map" is not a great name for this formatter.

What about items or mapItems ? (Python uses items)

@mvuksano
Copy link
Contributor Author

Ok, I renamed to mapitems. I don't think items by itself is sufficient enough to communicate that this filter is only supposed to be used with maps.

MapFormatter can be used with repeat decorator to display a list of key value pairs

Closes dart-archive#394
mvuksano added a commit that referenced this pull request Apr 21, 2014
MapFormatter can be used with map and ng-repeat to display a list of key value pairs

Closes #394

Closes #931
@mvuksano mvuksano closed this in d2780f8 Apr 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

2 participants