Questions tagged angular-material

Explore the latest questions and answers asked by our top developers.

How to scroll to the top of matDialog in angular material

I am having issue scrolling to the top of a MatDialog in angular material. I tried let top = document.getElementById("top"); if (top !== null) { top.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest", }); top = null; } but it doesn’t scroll to the top at all. I also tried this answer from a stackoverflow question […]

By walexy
Published
Categorized as angular, angular-material, javascript Tagged , ,

Angular: multiple material snackbar in global ErrorHandler

I use in angular the following global ErrorHandler: @Injectable() export class GlobalErrorHandler implements ErrorHandler { constructor(private errorService: ErrorService, private messageNotificationService: MessageNotificationService) { } handleError(error: Error | HttpErrorResponse | any) { // handle api server error } else { // client Error message = this.errorService.getClientErrorMessage(error); this.messageNotificationService.showError(message); } } } and the following NotificationService with snackbar @Injectable({ […]

Angular: multiple material snackbar in gloabl ErrorHandler

I use in angular the following global ErrorHandler: @Injectable() export class GlobalErrorHandler implements ErrorHandler { constructor(private errorService: ErrorService, private messageNotificationService: MessageNotificationService) { } handleError(error: Error | HttpErrorResponse | any) { // handle api server error } else { // client Error message = this.errorService.getClientErrorMessage(error); this.messageNotificationService.showError(message); } } } and the following NotificationService with snackbar @Injectable({ […]

How can I display a dialog before opening a component with Angular and Angular material?

How can i display a dialog before opening a component with Angular and Angular material? I have 2 components, the first component contains a button onclick route to the second component. I want to display a popup or a dialog in opening this second component. how can i do this ! I work with Angular […]

By AchrafBj
Published
Categorized as angular, angular-material, typescript Tagged , ,

some angular material modules not working in angular 12+

I am using angular 12 and having issues while accessing some features from MatExpansionModule and they are not working. In this image, you can see controlDialogComponent in declarations that is a modal dialog and it is working as expected but when I use <mat-expansion-panel> in this component I receive errors saying mat-expansion-panel is not a […]

How can i Displaying / Showing a dialog before opening a component with Angular and angular material?

How can i Displaying or Showing a dialog before opening a component with Angular and angular material ? I have 2 components, the first component contains a button onclick route to the second component and i want to display a popup or a dialog in opening this second component. I work with Angular 8 and […]

How can I create a box in Angular with paragraph on left and right with different color?

I have hard time creating this box in Angular, can someone please help me? https://i.stack.imgur.com/snVfv.png Source: Angular Material Quesions

By Emmanuel Asinyo
Published
Categorized as angular, angular-material, css, html Tagged , , ,

How to pass material row template to custom table

I have created my custom table using angular material. this is the source code. I try to add an option to pass custom row template so I will be sent it like that – <my-table [dataSource]="data"> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> </my-table> So i added @ContentChildren(MatRowDef) row: MatRowDef<any>; to my table component, and trying […]

By yantrab
Published
Categorized as angular, angular-material Tagged ,

Dynamic Styling of Angular Material Select Form Control

I am using Angular Materials in a project and I am trying to do some dynamic styling of a mat-select form control to fulfill a requirement. I want to override the default colors on some of the selector elements and also change these to another color when a selection has been confirmed (see picture below). […]

By norsemanGrey
Published
Categorized as angular, angular-material, css Tagged , ,

Custom mat calendar header

I am expecting the mat calendar header as customised one like in the below screen shot Source: Angular Material Quesions

By vivek
Published
Categorized as angular, angular-material, calendar Tagged , ,
1 2 3 675

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq