Skip to content

md-input ngControl attribute no longer works. since angular2-rc #406

Closed
@msegers

Description

@msegers

Note: for support questions, please use one of these channels:
https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question.
This repository's issues are reserved for feature requests and bug reports.

  • Do you want to request a feature or report a bug?
    Bug
  • What is the current behavior?
    Using an ngControl on md-input causes error:
    Error: Uncaught (in promise): No value accessor for 'username'
    when providing in template as:
<form #loginForm="ngForm" (submit)="onSubmit(loginForm.value)">
        <md-input ngControl="username" placeholder="user" ></md-input>
        <md-input ngControl="password" placeholder="pass" type="password"></md-input>
      <button md-raised-button color="primary" [disabled]="!loginForm.valid" type="submit">login</button>
    </form>
  • If the current behavior is a bug,
    please provide steps to reproduce and if possible a minimal demo of the problem

    via https://plnkr.co or similar.
  • What is the expected behavior?
    No errors shown, and works as normal input (changing md-input to normal input makes this functional again)
  • What is the motivation / use case for changing the behavior?
    It seems to break every usage of ngControl on these inputs.
  • Which version of Angular and Material, and which browser and OS does this issue affect?
    Did this work in previous versions of Angular / Material?
    Please also test with the latest stable and snapshot versions.
    I'm running the lastest config on webpack-angular2-starter, so the latest (alpha 4) material release and angular rc 1.
  • Other information

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