angular-material2

How to align button right inside Dialog angular material?

一世执手 提交于 2020-12-29 05:06:05
问题 I want align button right corner of the dialog below is my html <div mat-dialog-content> <p>What's your favorite animal?</p> <mat-form-field> <input matInput [(ngModel)]="data.animal"> </mat-form-field> </div> <div mat-dialog-actions> <button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button> </div> demo 回答1: You can use the align HTML attribute: <div mat-dialog-content> <p>What's your favorite animal?</p> <mat-form-field> <input matInput [(ngModel)]="data.animal"> </mat

How to align button right inside Dialog angular material?

眉间皱痕 提交于 2020-12-29 05:02:00
问题 I want align button right corner of the dialog below is my html <div mat-dialog-content> <p>What's your favorite animal?</p> <mat-form-field> <input matInput [(ngModel)]="data.animal"> </mat-form-field> </div> <div mat-dialog-actions> <button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button> </div> demo 回答1: You can use the align HTML attribute: <div mat-dialog-content> <p>What's your favorite animal?</p> <mat-form-field> <input matInput [(ngModel)]="data.animal"> </mat

MatDatePicker start week on monday

旧时模样 提交于 2020-12-25 04:24:18
问题 There is any way to configure the md-datepicker to start week on monday? By default it start on Sunday and there isn't any specification who to change this. 回答1: You have to build a custom DateAdapter . A custom DateAdapter is a class which implements the DateAdapter interface. It must have a bunch of predefined function implementations and have to be registered as a useClass for the DateAdapter provider. providers: [{provide: DateAdapter, useClass: CustomDateAdapter }] The date adapter tells

How to fix the header of mat-tab

若如初见. 提交于 2020-12-06 04:08:52
问题 I am having 5 mat-tab and each tab is having a large amount of data so scroll is getting added to that window. Is there any way through which I can fix the header of mat-tab and let the content to be scroll able. I tried putting position:fixed; and position:sticky inside ::ng-deep .mat-tab-label { } But it do not seems to solve the problem. my html <div class="container"> <mat-tab-group class="demo-tab-group" (selectedIndexChange)="loadDynamicContent($event)"> <mat-tab matTooltip="Tooltip!"