Angular2: Error – md-input-container must contain an mdInput directive. Did you forget to add mdInput to the native input or textarea element?

Standard

Error:

Error at MdInputContainerMissingMdInputError.ZoneAwareError 

md-input-container must contain an mdInput directive. Did you forget to
add mdInput to the native input or textarea element?

screenshot_2

Solution:

<md-input-container style="color: black;" class="pull-xs-left">
       <textarea [(ngModel)]="content" mdInput></textarea>
</md-input-container>

directive md-input needs to replaced with mdInput

Advertisements

One thought on “Angular2: Error – md-input-container must contain an mdInput directive. Did you forget to add mdInput to the native input or textarea element?

  1. srinivasakosuri

    I am using a using ASP.NET Core Anguar2 Starter Application. I am successful in upgrading the project to 2.4.9 but building the project gives me webpack build issue with 2.2.1. How did you over come that. Is there a sample project that you have done, so that I can use it for reference?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s