Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Arrays of strings not being handled properly within ng-repeat #1267

Closed
@donovanh

Description

@donovanh

When displaying a series of values from an array, the data items are not being bound to the model properly, as in:

$scope.model = {  values: [    "Value 1",    "Value 2,    ...  ]}

If the above is displayed in a series of input fields, changes to the content are not reflected in the model. However, binding the above using code like the following does maintain binding to the model:

<div ng-repeat="value in model.values">  <input type="text" ng-model="model.values[$index]" /></div>

However the issue with this approach is that the text field loses focus on each keyup. A demo is here:
http://jsfiddle.net/donovanh/GSx76/

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp