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.

Can't share a data-ng-model between <input type="number" /> and <input type="range" /> #8241

Closed

Description

@zippy1981

I demonstrate the issue in a plunkr here . This stackoverflow answer describes the issue in detail.

Simply put, at least in chrome <input type="number" />.value is a number. and <input type="range" />.value is a string, so that's what is breaking the data-ng-model binding. That could be fixed with some casting with the ngModel directive (and possibly the ngBind directive).

On another note, the w3c spec for number input and range input both say the value should be a string representation of a number. Is this worth filing a bug with chrome over?

Activity

  1. added this to the milestone on Jul 21, 2014
  2. Narretz commented on Jul 21, 2014

    @Narretz
    Contributor

    Hey @zippy1981, I edited your post so that the html tags show up. The general problem is that currently angular has no special range handling, but if it is added, this should be considered.

  3. Narretz commented on Jul 5, 2016

    @Narretz
    Contributor

    We are working on this (finally). Closing as a duplicate of #5892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions