angular-material

How to set server side pagination in Angular material Table using token

孤者浪人 提交于 2020-08-19 12:02:40
问题 here i have a issue while working with angular paginator . here i am getting data like below Response One: { "Tabledata": [ { "firstName":"Samuel", "lastName":"Smith" }, { "firstName":"Sanu", "lastName":"Smith" } ], "paging": { "RecordsCount": 2, "token": "JhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" } } Response Two: I am getting total records count as 50 { 'RecordsCount' : 50 } Now in the initial call the i am calling api and the api format is below Initial Call http://some api.com/data?searchParams

How to set server side pagination in Angular material Table using token

ⅰ亾dé卋堺 提交于 2020-08-19 11:59:27
问题 here i have a issue while working with angular paginator . here i am getting data like below Response One: { "Tabledata": [ { "firstName":"Samuel", "lastName":"Smith" }, { "firstName":"Sanu", "lastName":"Smith" } ], "paging": { "RecordsCount": 2, "token": "JhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" } } Response Two: I am getting total records count as 50 { 'RecordsCount' : 50 } Now in the initial call the i am calling api and the api format is below Initial Call http://some api.com/data?searchParams

Angular Material FlexLayout fxHide does not hide

徘徊边缘 提交于 2020-08-11 00:30:23
问题 I am working on mat-stepper with usage of flex-layout. Every step contains and icon and a paragraph to make it responsible and more readable I want to hide paragraph on smaller screens and leave only icon. Per my understanding fxHide.lt-sm should hide element if the resolution is lower than small but unfortunately nothing happens and it looks like this: Image of stepper (Galaxy S5 size) Here is the code: <mat-horizontal-stepper> <mat-step> <ng-template matStepLabel> <ul> <li> <mat-icon>format

Angular Material FlexLayout fxHide does not hide

旧时模样 提交于 2020-08-11 00:30:02
问题 I am working on mat-stepper with usage of flex-layout. Every step contains and icon and a paragraph to make it responsible and more readable I want to hide paragraph on smaller screens and leave only icon. Per my understanding fxHide.lt-sm should hide element if the resolution is lower than small but unfortunately nothing happens and it looks like this: Image of stepper (Galaxy S5 size) Here is the code: <mat-horizontal-stepper> <mat-step> <ng-template matStepLabel> <ul> <li> <mat-icon>format

How to get the entire path of the selected menus in Angular material Nested menus

谁说胖子不能爱 提交于 2020-08-10 20:00:08
问题 I am new to angular and using the Angular material Nested menu the code is pretty simple like this <mat-menu #animals="matMenu"> <button mat-menu-item [matMenuTriggerFor]="vertebrates">Vertebrates</button> <button mat-menu-item [matMenuTriggerFor]="invertebrates">Invertebrates</button> </mat-menu> <mat-menu #vertebrates="matMenu"> <button mat-menu-item [matMenuTriggerFor]="fish">Fishes</button> </mat-menu> <mat-menu #invertebrates="matMenu"> <button mat-menu-item>Insects</button> </mat-menu>

Angular Material Snackbar: Add Icon Without Creating Another Component

只愿长相守 提交于 2020-08-10 19:19:58
问题 Is there method to Add Material Icon (Checkbox) Without Creating Another component in snackbar. Maybe through PanelClass or API style parameter? We have 100s of different snackbars with simple text. Trying to refrain from creating 100 additional components if possible. Need material checkbox (or any mat icon) in the left-align side of message. How to add Icon inside the Angular material Snackbar in Angular 5 let snackBarMessage = `${this.products?.length} Successfully Added`; this.snackBar

Angular Material Paginator is undefined

别来无恙 提交于 2020-08-09 17:20:44
问题 I use Angular Material (MatTable, MatPaginator). when i log in to my application and my component view is loaded, i get the following error in my browser debugger: ERROR TypeError: "_this._paginator is undefined; can't access its "pageIndex" property" ExampleDataSource http://localhost:4200/main.js:1446 __tryOrUnsub http://localhost:4200/vendor.js:160732 next http://localhost:4200/vendor.js:160670 _next http://localhost:4200/vendor.js:160603 next http://localhost:4200/vendor.js:160578

How to include filter in mat select nested values using angular

被刻印的时光 ゝ 提交于 2020-08-09 16:11:09
问题 I'm using angular material with nested dropdowns. The dropdown values nested with parent and child basis. I'm facing two issues. Auto suggestion is not working. If I type parent name or its associated child name, have to filter and show the particular parent view with expand mode. If i expand first parent and trying to expand the second parent, the first parent view should close automatically while expanding the second one. Please find the stackblitz link https://stackblitz.com/edit/angular

How to include filter in mat select nested values using angular

一个人想着一个人 提交于 2020-08-09 16:05:39
问题 I'm using angular material with nested dropdowns. The dropdown values nested with parent and child basis. I'm facing two issues. Auto suggestion is not working. If I type parent name or its associated child name, have to filter and show the particular parent view with expand mode. If i expand first parent and trying to expand the second parent, the first parent view should close automatically while expanding the second one. Please find the stackblitz link https://stackblitz.com/edit/angular

angular 8 material dialog close button with X top right

烈酒焚心 提交于 2020-08-06 08:11:25
问题 I am trying to get my material dialog to have an X button at the top right, but I am having problems with the positioning. component.ts this.d.open(loginComponent, { width: '300px', height: '', panelClass: 'dialogC', }); component.html <mat-dialog-content> <button mat-button class="close-icon" [mat-dialog-close]="true"> <mat-icon>close</mat-icon> </button> <h2 mat-dialog-title>Login</h2> style.scss .dialogC { position: relative !important; } .close-icon { position: absolute; top: 0; right: 0;