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-select converts numbers to strings #3233

@daniel-nagy

Description

@daniel-nagy

The md-select directive will convert a Number to a String. This may result in unexpected $watch events triggering. For example,

$scope.number = 10;

$scope.$watch('number', function (newValue, oldeValue) {
    // newValue = "10", oldValue = 10    
    if(newValue === oldeValue) {
        return;
    }
    ...
}

codepen

I suggest adding a type attribute to the md-select directive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions