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.

select with ng-options and track expression does not set selected element #8415

Closed
@joscha

Description

@joscha

Request Type: bug

How to reproduce: Create the following HTML structure:

<div ng-init="a = [{label: 'one', value: 15}, {label: 'two', value: 20}]; foo = 15">
    foo: {{foo}}<br/>
    <select ng-model="foo" ng-options="x.value as x.label for x in a track by x.value"/>
</div>

Component(s): misc core

Impact: medium

Complexity: small

This issue is related to: #8366 (probably)

Detailed Description:

Test case here: http://jsfiddle.net/joscha/6h4Md/2/
Everything works as expected except the displayed selected item is not updated.

Other Comments:

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