I am developing an Angular web application using:
- Angular 4.1.2
- Angular Material 2.0.0-beta.11
I am trying to create a simple modal dialog which, upon opening, provides some input fields for the user to complete and submit. My dialog box will contain:
- Simple text entry.
- Drop-down list
- Calendar picker
To begin with I have only added a text input field and a select drop-down list. I cannot understand if I need to create a <form>
and wrap each element within a <md-form-field>
. When I try this I get an error:
md-form-field must contain a MdFormFieldControl. Did you forget to add mdInput to the native input or textarea element?
If I don't wrap the <md-select>
element within a <md-form-field>
I get no error, but the styling is different from the <input>
element above it.
I cannot work out how to include all 3 UI components, equally styled, within the same modal dialog. Any advise very welcome.