angular-material

Angular Mat-Table finished rendering Event / Mat Paginator Loading Spinner

不羁岁月 提交于 2021-01-27 08:37:55
问题 I am using an Angular Material Table with a rather big, pre queried Datasource. Now, everytime i change the Table Pages with the built in Paginator, i have a short Delay before the new Table-Rows are rendered and i would like to display a Loading Spinner in the meantime. The Problem is, the Paginator does only fire a single Event when the Table-Page starts changing and up to now, I did not find a solution to find out, when the new Rows are rendered completely. (This would be the moment when I

Angular Mat-Table finished rendering Event / Mat Paginator Loading Spinner

感情迁移 提交于 2021-01-27 08:37:51
问题 I am using an Angular Material Table with a rather big, pre queried Datasource. Now, everytime i change the Table Pages with the built in Paginator, i have a short Delay before the new Table-Rows are rendered and i would like to display a Loading Spinner in the meantime. The Problem is, the Paginator does only fire a single Event when the Table-Page starts changing and up to now, I did not find a solution to find out, when the new Rows are rendered completely. (This would be the moment when I

How to use ngfor in grid-list by material

你。 提交于 2021-01-27 04:40:21
问题 I want to implement a dynamic grid list with Angluar material. but I have some problems. My JSON data looks like this: [ { "abc": "sdfgsdfgs", "test": "dfgdfgdfgdfg" }, { "abc": "dfgsdfgsdfg", "test": "dfgfgfgfgr" }, { "abc": "sdfgsdfgs", "test": "asdfstest" }, ] And in the HTML I want to use ngFor to loop this JSON data and to show in a gird list. <mat-grid-list cols="2" rowHeight="7:1"> <mat-grid-tile> <u>abc</u> </mat-grid-tile> <mat-grid-tile> <u>test</u> </mat-grid-tile> <ng-container

mat-ink-bar location not update when container resizes

≡放荡痞女 提交于 2021-01-25 03:57:32
问题 I using angular-material mat-tab-nav-bar I have side menu on the right side of the screen, click on it change the width of the side menu, and the center screen width change according to the menu width. the problem is that the mat-ink-bar right/left position not changed. Any idea? 回答1: You can force the ink bar to re-align by calling realignInkBar() on mat-tab-group,check out this example on StackBlitz To read further on the bug check out this thread 回答2: It is not the best solution ever, but

mat-ink-bar location not update when container resizes

只谈情不闲聊 提交于 2021-01-25 03:53:04
问题 I using angular-material mat-tab-nav-bar I have side menu on the right side of the screen, click on it change the width of the side menu, and the center screen width change according to the menu width. the problem is that the mat-ink-bar right/left position not changed. Any idea? 回答1: You can force the ink bar to re-align by calling realignInkBar() on mat-tab-group,check out this example on StackBlitz To read further on the bug check out this thread 回答2: It is not the best solution ever, but

Angular - Objects as Select Option Values

本小妞迷上赌 提交于 2021-01-21 12:33:34
问题 I have a form with various select boxes which use objects as the value: <mat-option [value]="object"> Which works great when I am creating new records via the form. Now when I am editing records, I run into the problem that the object in the mat-select-option is not the "same" object that I get from my rest service, so my select boxes have no option selected when editing the record. Is it possible to tell the select-box widget to match on object.id when deciding what option is selected? I

How to implement MD_DATE_FORMATS for datepicker?

北战南征 提交于 2021-01-21 07:10:53
问题 I'm trying to implement my own date format for shiny new datepicker from material2. According to documentation i have to provide my version of MD_DATE_FORMATS: providers: [ {provide: DateAdapter, useValue: NativeDateAdapter }, {provide: MD_DATE_FORMATS, useValue: MY_DATE_FORMATS }, ], When I use default implementation: export const MD_NATIVE_DATE_FORMATS: MdDateFormats = { parse: { dateInput: null, }, display: { dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'}, monthYearLabel:

How to mat-button-toggle by default selected in angular

蹲街弑〆低调 提交于 2021-01-21 06:13:41
问题 How can I set default selected last button in toggle group. This is my code. <mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle value="Heritage"> <span>Heritage</span> </mat-button-toggle> <mat-button-toggle value="Nature"> <span>Nature</span> </mat-button-toggle> <mat-button-toggle value="People"> <span>People</span> </mat-button-toggle> <mat-button-toggle value="All"> <span>All</span> </mat-button-toggle> </mat-button-toggle-group> 回答1: I fixed it. Simply add the

How to mat-button-toggle by default selected in angular

我的未来我决定 提交于 2021-01-21 06:12:25
问题 How can I set default selected last button in toggle group. This is my code. <mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle value="Heritage"> <span>Heritage</span> </mat-button-toggle> <mat-button-toggle value="Nature"> <span>Nature</span> </mat-button-toggle> <mat-button-toggle value="People"> <span>People</span> </mat-button-toggle> <mat-button-toggle value="All"> <span>All</span> </mat-button-toggle> </mat-button-toggle-group> 回答1: I fixed it. Simply add the

How to mat-button-toggle by default selected in angular

我的未来我决定 提交于 2021-01-21 06:12:06
问题 How can I set default selected last button in toggle group. This is my code. <mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle value="Heritage"> <span>Heritage</span> </mat-button-toggle> <mat-button-toggle value="Nature"> <span>Nature</span> </mat-button-toggle> <mat-button-toggle value="People"> <span>People</span> </mat-button-toggle> <mat-button-toggle value="All"> <span>All</span> </mat-button-toggle> </mat-button-toggle-group> 回答1: I fixed it. Simply add the