Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-repeat with filters that introduce new collections #2302

Open
@jasonkuhrt

Description

@jasonkuhrt

There is a thorough discussion including analysis, ideas, and fiddles here (concluding with some successful work-arounds):

https://groups.google.com/forum/#!msg/angular/IEIQok-YkpU/oKuLvzCnAcoJ

A common instigating use-case is chunking arrays for grids:

http://stackoverflow.com/questions/11056819/how-would-i-use-angularjs-ng-repeat-with-twitter-bootstraps-scaffolding

I believe the issue can be summarized as difficulty using ng-repeat with filters that change the collection's reference...? Brainstorming possible directions forward:

  1. Would track by 61f2767 syntax make it possible to use filters that subsequently change the collection reference? It seems to me track by and this issue have nothing to do with each other ultimately.

  2. Could/should this issue by resolved by new additions to angular's destructing syntax? i.e.

    row in items chunk by 6
    

    Seems to me to be too specific a feature to make part of the destructing syntax.

  3. An angular $service that supports creating filters that modifier collection reference within ng-repeat. So that chunk or any other filter could be confidently applied to ng-repeat:

    What users are rolling on their own: http://jsfiddle.net/pkozlowski_opensource/zvpVg/2/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions