angular-material

Change step number to a mat-icon in an Angular Material Stepper

假如想象 提交于 2020-02-03 02:11:54
问题 I want to create an Angular Material stepper, but instead of a number inside the bubble I want to use mat-icons, how should I do this? 回答1: You can use matStepperIcon to override the icon. <mat-horizontal-stepper> <mat-step label="Step 1" state="minus"> <p>Minus</p> <div> <button mat-button matStepperNext>Next</button> </div> </mat-step> <mat-step label="Step 2" state="plus"> <p>Plus</p> <div> <button mat-button matStepperNext>Next</button> </div> </mat-step> <ng-template matStepperIcon=

Angular 8: Change Height in Mat-form-field to Specific pixel number

ε祈祈猫儿з 提交于 2020-02-02 13:07:26
问题 The bounty expires in 7 days . Answers to this question are eligible for a +50 reputation bounty. Artportraitdesign1 is looking for an answer from a reputable source . How can I change height in mat-form-field with appearance="outline" to a specific height pixel number, 40px (or any required number from UX team in the future). I need to reduce the mat-form-field. How can this be done? What is the equation, or which part number can be modified to change to 40px? -1.1? .75 , 133%, Looking for

Angular 8: Change Height in Mat-form-field to Specific pixel number

一笑奈何 提交于 2020-02-02 13:07:06
问题 The bounty expires in 7 days . Answers to this question are eligible for a +50 reputation bounty. Artportraitdesign1 is looking for an answer from a reputable source . How can I change height in mat-form-field with appearance="outline" to a specific height pixel number, 40px (or any required number from UX team in the future). I need to reduce the mat-form-field. How can this be done? What is the equation, or which part number can be modified to change to 40px? -1.1? .75 , 133%, Looking for

Angular 1 material design scrolls to top after closing dialog in firefix

怎甘沉沦 提交于 2020-02-02 02:44:20
问题 Hi when i open a dialog window using Angular material in firefox. The page scrolls to the top after the dialog is closed. Can anyone explain why this happens or have a workaround. See https://codepen.io/WitteStier/full/EmzKQb/ HTML <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body ng-app="App" ng-controller="AppCtrl"> <div style="height:1500px;">Scroll down</div> <md-button ng-click="openDialog($event)"> Open dialog </md-button> <div

How to show full text and wrap in menu item in angular material

Deadly 提交于 2020-02-01 04:36:48
问题 I am trying to make a notification system, So I am using the mat-menu from angular material. I've increased the width of menu-item but the problem is that it is not showing the full content. It is only showing the text which comes in one line. but I want to wrap the text on a new line if it exceeds that line like here my compontent.html <button mat-button [matMenuTriggerFor]="notification"><mat-icon>add_alert</mat-icon></button> <mat-menu #notification="matMenu" [overlapTrigger]="false" class

Angular Material Side Bar with “Half” side mode

限于喜欢 提交于 2020-01-31 09:05:32
问题 I am working on the dynamic side bar for our project, basically what we want to do is to set up a dynamic side bar when user click on the side bar it will spread when user click back sidebar should collapse and show only icons (but not totally collapse it will keep the icons) for example before user click the icon. We are using sidenav.toggle()from angular material function which basically closes the sidebar completely and if I don't use toggle() function "Side" mode for navbar does not work.

Angular Material Side Bar with “Half” side mode

 ̄綄美尐妖づ 提交于 2020-01-31 09:05:13
问题 I am working on the dynamic side bar for our project, basically what we want to do is to set up a dynamic side bar when user click on the side bar it will spread when user click back sidebar should collapse and show only icons (but not totally collapse it will keep the icons) for example before user click the icon. We are using sidenav.toggle()from angular material function which basically closes the sidebar completely and if I don't use toggle() function "Side" mode for navbar does not work.

How to use scrollStrategy in MatDialog?

℡╲_俬逩灬. 提交于 2020-01-31 03:22:49
问题 I tried to make a scroll for a dialog in reposition strategy, but it doesn't work for me. const scrollStrategy = this.overlay.scrollStrategies.reposition(); const dialogRef = this.dialog.open( DialogOverviewExampleDialog, { scrollStrategy } ); The full example I expect that during scrolling the whole dialog(element .cdk-overlay-pane ) will move Almost right behavior 回答1: If you want to scroll the content of the dialog then you have to use the <mat-dialog-content> tag, or use the directive mat

How to use scrollStrategy in MatDialog?

我的未来我决定 提交于 2020-01-31 03:22:27
问题 I tried to make a scroll for a dialog in reposition strategy, but it doesn't work for me. const scrollStrategy = this.overlay.scrollStrategies.reposition(); const dialogRef = this.dialog.open( DialogOverviewExampleDialog, { scrollStrategy } ); The full example I expect that during scrolling the whole dialog(element .cdk-overlay-pane ) will move Almost right behavior 回答1: If you want to scroll the content of the dialog then you have to use the <mat-dialog-content> tag, or use the directive mat

Angular material date picker format locale

随声附和 提交于 2020-01-30 11:49:05
问题 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: