Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
msegers opened this issue May 9, 2016 · 3 comments
Closed

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

msegers opened this issue May 9, 2016 · 3 comments

Comments

@msegers
Copy link

msegers commented May 9, 2016

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
@msegers
Copy link
Author

msegers commented May 9, 2016

Trying to set up a plnkr atm.

@msegers
Copy link
Author

msegers commented May 9, 2016

I was adding the FORM_DIRECTIVES from 'angular2/common';

That is wrong and that breaks stuff so no issue.

@msegers msegers closed this as completed May 9, 2016
andrewseguin pushed a commit to andrewseguin/components that referenced this issue Oct 15, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant