Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

ng-true-value and ng-false-value take expressions vs. string values in AngularJS #741

@chalin

Description

@chalin

Consider the following example taken from the AngularJS input[checkbox] page

<script>
  function Ctrl($scope) {
    $scope.value1 = true;
    $scope.value2 = 'YES'
  }
</script>
<form name="myForm" ng-controller="Ctrl">
  Value1: <input type="checkbox" ng-model="value1"> <br/>
  Value2: <input type="checkbox" ng-model="value2"
                 ng-true-value="YES" ng-false-value="NO"> <br/>
  <tt>value1 = {{value1}}</tt><br/>
  <tt>value2 = {{value2}}</tt><br/>
 </form>

This needs to be tweaked for it to work in AngularDart: namely, the arguments to ng-true-value and ng-false-value are taken as expressions. Is this intentional? If so, then to documentation will need to be updated.

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