question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Md Form Field is not working

See original GitHub issue

I have an error: md-form-field must contain a MdFormFieldControl. Did you forget to add mdInput to the native input or textarea element?

This is my current html: <form [formGroup]="form" *ngIf="form"> <md-form-field> <input mdInput placeholder="title" name="title" formControlName="title"> </md-form-field> </form>

and the version of my material: "@angular/material": "^2.0.0-beta.10"

Thanks !

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
davenlin19commented, Sep 8, 2017

Sorry i don’t know why but my plunker works: http://plnkr.co/edit/LjSqMOVm9xAo01QCBTAn?p=streamer

In fact, i think i know why i had this error, i didn’t import the MdInputModule. Now, i import it, also the BrowserAnimationsModule. I have a normal input with no style at all.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template parse errors: 'md-form-field' is not a known element
To use <md-form-field> selector, make sure that you have version 2.0.0-beta.10 of material installed. Moreover, you need to import ...
Read more >
Input field label not working properly - MDBootstrap
The issue I'm facing is that the label and placeholders aren't 'moving' up and staying where they are. User input is being typed...
Read more >
Template parse errors: 'md-form-field' is not a known element
Template parse errors: 'md-form-field' is not a known element: 1. If 'md-form-field' is an Angular component, then verify that it is part of...
Read more >
Form field - Angular Material
This error occurs when you have not added a form field control to your form field. If your form field contains a native...
Read more >
Validation · Bootstrap v5.0
<form class="row g-3 needs-validation" novalidate> <div class="col-md-4"> <label ... To fix issues with border radii, input groups require an additional ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found