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='size in sizes' input ng-model='size[$index]' - duplicating values on .push() #1466

@zivester

Description

@zivester

I'm trying to bind to an array of arbitrary length, and add more values if certain constraints are met. In this fiddle, I want to add new inputs when all the other inputs have a value set.

http://jsfiddle.net/JPJd3/8/

As you can see after typing into the empty input, the value is replicated into the new input.

I've seen #905 and #1267, but I'm not sure if those apply here (the second one's fiddle is gone).

UPDATE: This works utilizing $timeout (original still seems like a bug):

http://jsfiddle.net/JPJd3/11/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions