angular-material

Angular material date picker format locale

只愿长相守 提交于 2020-01-30 11:48:36
问题 I have created an angular material date picker component to use with formly , and tried to set it to use GB for the locale so that dates are shown as 26/07/2019 . However, when typing in the date, it parses as US still, resulting in invalid date errors being shown. I have tried to include moment and the MomentDateAdapter module but have been unable to solve the issue. Here is a stackblitz I've set my providers like so: providers: [ { provide: LOCALE_ID, useValue: 'en-GB' }, { provide:

How to prevent Dialog opening twice in angular material using angular5

北战南征 提交于 2020-01-30 06:33:12
问题 <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let person of filteredPersons | async" [value]="person.name" (onSelectionChange)="selectedPersonsInDialog(person)"> <img style="vertical-align:middle;" aria-hidden src="{{person.imgUrl}}" width="30" height="30" /> <span>{{ person.name }}</span> | <small>ID: {{person.id}}</small> </mat-option> </mat-autocomplete> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let person of filteredPersons | async" [value]="person

Angular-material - animation and position is not displaying correct

岁酱吖の 提交于 2020-01-25 12:54:26
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom

Angular-material - animation and position is not displaying correct

故事扮演 提交于 2020-01-25 12:53:20
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom

How to use the grid-list in Angular Material, so that all page content is displayed between the header and footer?

百般思念 提交于 2020-01-25 09:53:08
问题 I use Angular 6 and Material 6.4.7. I need to implement the grid-list on the main page. Make it so that the header and footer have a fixed width, and content occupies the rest of the space. How do I do this? <mat-grid-list cols="1"> <mat-grid-tile-header> <app-header></app-header> </mat-grid-tile-header> <mat-grid-tile> <router-outlet></router-outlet> </mat-grid-tile> <mat-grid-tile-footer> <app-footer></app-footer> </mat-grid-tile-footer> 回答1: MatGridList is not a layout tool! It is a

How to use the grid-list in Angular Material, so that all page content is displayed between the header and footer?

别说谁变了你拦得住时间么 提交于 2020-01-25 09:53:05
问题 I use Angular 6 and Material 6.4.7. I need to implement the grid-list on the main page. Make it so that the header and footer have a fixed width, and content occupies the rest of the space. How do I do this? <mat-grid-list cols="1"> <mat-grid-tile-header> <app-header></app-header> </mat-grid-tile-header> <mat-grid-tile> <router-outlet></router-outlet> </mat-grid-tile> <mat-grid-tile-footer> <app-footer></app-footer> </mat-grid-tile-footer> 回答1: MatGridList is not a layout tool! It is a

How to get labels as name propery from the backend with Angular material?

时光毁灭记忆、已成空白 提交于 2020-01-25 09:32:05
问题 I am using angular material table. And the data comes from the backend. And I have a clolumn header projects. And if you hover over the header then there will appear checkboxes with the name of the projects. I have the checkbox. But how to show the project names by the checkboxes? I have this: template: <ng-container matColumnDef="projects"> <th mat-header-cell *matHeaderCellDef (mouseover)="show = true" (mouseout)="show = false" mat-sort-header i18n> <mat-checkbox [style.opacity]="show ? 1 :

Angular Material tool-tip with HTML support

感情迁移 提交于 2020-01-25 07:20:07
问题 I just want to know that, Is there any good third party angular material tool-tip plugin with the support of HTML ? I am using Material design with Angular 7 only(no bootstrap) Although I am using ng2-tooltip-directive and it full fill's all my needs but it has some issues related to positioning of tool-tip on different browsers. Any other suggestions as HTML is not supported in angular material tooltips and for now, they don't have intentions to support it either 回答1: I have used SAT Popover

How to add scrollbar to my dialog in Angular?

孤街浪徒 提交于 2020-01-25 06:49:07
问题 I am opening a dialog window using the following function: doOutput(){ this.dialog.open(NgxChartsComponent ) ; } And the HTML code of my NgxChartsComponent is: <!-- The chart type goes in here --> <div> This is a visual representation of a line chart</div> <div style="display: inline-block"> <ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel"

Component for wrap angular material input does not show error styles

南楼画角 提交于 2020-01-24 23:06:29
问题 I want to enclose a matInput of angular material within a component to reuse it in other places of my application because I need to manage its internal state to change the input type from text to password and viceversa. I managed to do it by implementing ControlValueAccessor but the styles of validation errors are not being displayed. Password field component: export class PasswordFieldComponent implements OnInit, ControlValueAccessor { @ViewChild(DefaultValueAccessor) private valueAccessor: