Angular Material comprises a range of components which implement common interaction patterns according to the Material Design specification. Form Controls Controls that collect and validate user input. Navigation Menus, sidenavs and toolbars that organise your content.
Some Material components depend on the Angular animations module in order to be able to do more advanced transitions. If you want these animations to work in your app, you have to install the @angular/animations module and include the BrowserAnimationsModule in your app.
There are 3 questions to keep in mind while customizing the styles of Angular Material components: Are your styles encapsulated? Are your styles more specific than the defaults?
Datepicker with min & max validation. Choose a date. The second way to add date validation is using the matDatepickerFilter property of the datepicker input. This property accepts a function of <D> => boolean (where <D> is the date type used by the datepicker, see Choosing a date implementation).
Material supports the ability for an mat-menu-item to open a sub-menu. To do so, you have to define your root menu and sub-menus, in addition to setting the [matMenuTriggerFor] on the mat-menu-item that should trigger the sub-menu:
Begin by creating a <mat-table> component in your template and passing in data. The simplest way to provide data to the table is by passing a data array to the table's data input. The table will take the array and render a row for each object in the data array.
The most basic card needs only an <mat-card> element with some content. However, Angular Material provides a number of preset sections that you can use inside of an <mat-card>: Element. Description. <mat-card-title>. Card title. <mat-card-subtitle>. Card subtitle.