X Tutup
Skip to content

type="number" passes String as argument #4014

@rightisleft

Description

@rightisleft

When setting the field of:

num bZip;

From:

        <div class="form-group">
            <label for="billing_zip">Zip</label>
            <input type="number" id="billing_zip" [(ng-model)]="dto.bZip" class="form-control" [required]="true"/>
        </div>

EXCEPTION: Error during evaluation of "ngModel"
ORIGINAL EXCEPTION: type 'String' is not a subtype of type 'num' of 'value'.
ORIGINAL STACKTRACE:

Using Angular Dart alpha 35

Fix: if i set the field to String bZip on the DTO object

name: 'tickets'
version: 0.0.1
description: A ticket commerce application
author: Jack Murphy jack@rightisleft.com
homepage: https://www.rightisleft.com
environment:
  sdk: '>=1.0.0 <2.0.0'
dependencies:
#Server Dependencies
  json_object: "1.0.19"
  mongo_dart: "0.1.46"
  connection_pool: "0.1.0+2"
  dartson: "0.2.4"
  guinness: "0.1.17"
  shelf: '>=0.6.2 <0.7.0'
  shelf_static: "0.2.2"
  shelf_route: "0.14.0"
#Client Dependencies
  bootjack: "0.6.5"
  browser: ">=0.10.0+2 <0.11.0"
  sass: "0.4.2"
  angular2: "2.0.0-alpha.35"
transformers:
- dartson
- sass
- angular2:
    entry_points:
        - web/main.dart
    reflection_entry_points:
        - web/main.dart
- $dart2js:
    minify: true
    commandLineOptions:
    - --dump-info
    - --show-package-warnings
    - --trust-type-annotations
    - --trust-primitives

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup