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

md-chips not working inside ng-repeat #3482

Closed

Description

@cnjsstong

Example here:
http://codepen.io/anon/pen/PqEZpa

If a md-chips is inside of any ng-repeat, it will not work properly. Only the last repeated item has its md-chips shown normally.

This makes md-chips barely useful...

Activity

  1. ahmadhsalim commented on Jun 28, 2015

    @ahmadhsalim

    I'm having the same trouble. The following code doesn't work.

    <md-chips>
          <md-chip ng-repeat="i in [1, 2, 3]">Normal Static Chip</md-chip>
    </md-chips>
    

    But weird thing is that, I have the below code in a page and the ng-repeat is populated from an array in scope. No chips are shown. Then I navigate to another page and press the browsers back button. Suddenly all the chips are displayed properly.

  2. dmackerman commented on Jun 29, 2015

    @dmackerman

    You can bind md-chips to an ng-model array and it will populate, but yeah - it's totally broken with `ngRepeat. :(

  3. cnjsstong commented on Jun 29, 2015

    @cnjsstong
    Author

    @dmackerman Thanks.

    Actually, @ahmadhsalim 's issue can have a workaround with ng-model.

    However, my example is also quite common but can not be achieved now.

  4. ahmadhsalim commented on Jun 30, 2015

    @ahmadhsalim

    How can I use a workaround? What I want is static chips that cannot be edited. With ng-model bound to an array, it's not giving me static chips.

  5. cnjsstong commented on Jun 30, 2015

    @cnjsstong
    Author

    @ahmadhsalim Just make the chips readonly in addition. Please go to #2829 which is the correct issue for you.

  6. modified the milestone: 0.11.0 on Jul 6, 2015
  7. added 3 commits that reference this issue on Aug 13, 2015
    0dbaf09
    2ad43e3
    d2da1c7
  8. added a commit that references this issue on Sep 23, 2015
    c424b95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions