Not getting started with angular material

38 views
Skip to first unread message

Rudy F

unread,
Mar 8, 2020, 9:44:15 AM3/8/20
to angular-material2
Hi All, 

I am trying to start with angular material but I cannot have the form showing up as the demo. 

I copy pasted that code: 

<div class="example-container">
 <mat-form-field appearance="fill">
   <mat-label>Input</mat-label>
   <input matInput>
 </mat-form-field>
 <br>
 <mat-form-field appearance="fill">
   <mat-label>Select</mat-label>
   <mat-select>
     <mat-option value="option">Option</mat-option>
   </mat-select>
 </mat-form-field>
 <br>
 <mat-form-field appearance="fill">
   <mat-label>Textarea</mat-label>
   <textarea matInput></textarea>
 </mat-form-field>
</div>


And imported  this into my app module

import {MatNativeDateModule} from '@angular/material/core';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms'; But unfortunately I have a regular textarea showing with a regular input field without styling and a select field but which does not work.

anything missing here?


Rudy F

unread,
Mar 8, 2020, 9:46:10 AM3/8/20
to angular-material2

Capture d’écran, le 2020-03-08 à 09.45.35.png

 
Reply all
Reply to author
Forward
0 new messages