angular-material

Angular Material Tabs how to customize tab row and add text or dropdown list?

大城市里の小女人 提交于 2021-01-29 12:34:27
问题 I am currently using angular material tabs and I wish to add text before the tabs and also add a drop down list at the end of the row after the tabs. Ideally it should looks something like the following picture: I tried putting a label or creating a div beside the tabs, however those are not showing. In the end, I created another tab and set it to disabled but I think this is not ideal and I couldn't change the disabled text colour. As for the drop down list I have no clue how to go about it.

Angular 4 mat-radio-group with mat-form-field return Error

China☆狼群 提交于 2021-01-29 11:18:09
问题 I'm working in a project when i need to make a steps to print the tags for products, but when i use step control with mat-form-group to control steps, and mat-radio-group i recieve the Error: mat-form-field must contain a MatFormFieldControl. I already tried set matInput into the mat-radio-group, like i do with mat-select, but does not work This work: <mat-step [stepControl]="firstFormGroup"> <form [formGroup]="firstFormGroup"> <ng-template matStepLabel>Informe o tipo de produto</ng-template>

Angular material animations not working after using custom theme

我的梦境 提交于 2021-01-29 10:39:43
问题 I'm using angular material version 7 and angular version 7 After i change to custom theme It seems like all work accept the animations The mat-progress-bar stopped move like it should this is my progress-bar <mat-progress-bar mode="indeterminate"></mat-progress-bar> and here is the custom theme $my-primary: ( 50: #34495e, 100: #34495e, 200: #34495e, 300: #34495e, 400: #34495e, 500: #34495e, 600: #34495e, 700: #34495e, 800: #34495e, 900: #34495e, A100: #34495e, A200: #34495e, A400: #34495e,

Angular Material Select - Default Value - Reactive Forms

非 Y 不嫁゛ 提交于 2021-01-29 10:17:07
问题 I'm losing it here. There are so many questions on this subject, and no matter what I try I can't get it to work. I'm simply wanting to set the default value of a mat-select. I have a list of Employees. Clicking on a list item opens a dialog (Employee Details) so I can edit (or add) the Employee's data. I just want the Department mat-select to display the Employee's current department when the mode is edit. employee-details.component.html <div fxLayout="column"> <div class="flex-item" fxFlex

Change formatting of date upon calling value

天大地大妈咪最大 提交于 2021-01-29 09:15:36
问题 On my frontend, I use an Angular (11) Material Datepicker element to let the user pick a date. The formatting for this is done using the MAT_DATE_LOCALE provider, and it is dd-MM-YYYY , so 23-12-2020 for today. This Datepicker is linked to a FormControl using reactive forms. While I am content with how the date is represented to the user, I'd like to send the date in a YYYY-MM-dd format. It seems the Datepicker is setting the value of the FormControl to a Date object and I don't know if I can

Angular Material Paginator: How to trigger go to first page event on ts file

依然范特西╮ 提交于 2021-01-29 08:46:37
问题 Im using material paginator for paging some custom cards. And i made a selector for filter the data. I want to trigger paginator go to first page event when i changed the selector value. Because for example while im looking at page 10 and changed filter value paginator show me the empty page if i dont have enough data to show at 10.page. 回答1: I solved my problem. Solution; import import { MatPaginator } from '@angular/material'; this at your .ts file. (not app.module.ts) add this to same file

Angular Material table sorting list of IPs

对着背影说爱祢 提交于 2021-01-29 08:12:07
问题 Example here I'm not sure why Material Table sorting doesn't order the table correctly I made an example stackblitz there. (Expected) Sorted lowest IP first "10.16.0.8" "10.16.0.16" "10.16.0.32" "10.16.10.35" "10.16.10.64" "10.16.10.120" (Expected) Then you click button to sort highest and you'd get "10.16.10.120" "10.16.10.64" "10.16.10.35" "10.16.0.32" "10.16.0.16" "10.16.0.8" But the current output when sorting now can be : 10.16.0.16 10.16.0.32 10.16.0.8 10.16.10.120 10.16.10.35 10.16.10

The angular material dialog is not working in production build

我与影子孤独终老i 提交于 2021-01-29 08:09:59
问题 I am using angular 10 and angular material 10. the angular material dialogue is not working in the production build ( ng serve --prod and ng build --prod ) but It is working fine local dev environment ( ng serve ) I have already added the component in the entryComponents and bootstrap It is not throwing any kind of error in the console. what I can see is the card is loaded and no components inside the dialog are available, You can see the below screenshot, which is loading the card but not

How do I fix a year of two digits in mat-datepicker in IE browser?

橙三吉。 提交于 2021-01-29 06:32:11
问题 In IE browser When I type a date with a year of two digits for example: 03/12/17 the mat-datepicker converts the year to 03/12/1917. I want mat-datepicker to convert the year 17 to the current year 2017 for example if I type 03/12/17 the mat-datepicker should convert that date to 03/12/2017. In Chrome browser the mat-datepicker converts the two digits year correctly 17 to 2017. mat-datepicker: https://material.angular.io/components/datepicker/overview Is there any solution for that problem in

I want two tabsheet one vertical and other horizontal of angular material and make them work together

断了今生、忘了曾经 提交于 2021-01-29 05:10:31
问题 I have one requirement to have two tabsheets one will be vertical and other one will be horizontal. Just explaining my scenario lets assume we have numbers to be shown from 1 to 5. will show numbers 1 to 5 in vertical tab sheet as well as from horizontal tab sheet. So now comes the scenario which I want is that if one clicks on vertical tab that is number 2 (for example) the tab with the same number that is 2 must be selected in the horizontal tab. Hope I tried my level best to explain my