Questions tagged [angular-material]

Angular Material is an implementation of Material Design in Angular. Do not use this tag for AngularJS Material, the implementation of Material Design for the older AngularJS framework.

Usage

  • This tag is intended for questions which ask about Angular Material
  • Please take note that you should use the tag for AngularJS 1.x Material questions instead of this tag.

Goal

Taken from the official repo:

The goal is to build a set of high-quality UI components built with Angular and TypeScript, following the Material Design spec. These components will serve as an example of how to write Angular code following best practices.

Asking a question

  • Mention the versions of Angular and Angular Material you're using.
  • Reduce your issue to a small example
  • Post a reduced working code on plnkr.co or stackblitz.com
  • If there's a bug (or some unintentional behavior), try to troubleshoot the problem. (If it's a bug report, please create a new issue at Angular Material's Github repository instead).

Learn more

To learn more about Angular Material, visit the following resources to help you get started:

19273 questions
31
votes
3 answers

Open the first attached expansion panel in an Angular Material accordion

Obviously you can use the input expanded on an Angular Material expansion panel to default a particular panel to be opened upon loading. However, I have an accordion where all of the expansion panels are generated dynamically, and all are optional,…
Aaron Hazelton
  • 709
  • 2
  • 8
  • 13
31
votes
3 answers

Change row color in Angular Material table

How do I change the color of a material table row depending on a cell value. I have this in my HTML:
Ibanez1408
  • 4,550
  • 10
  • 59
  • 110
31
votes
4 answers

Angular Material: How to validate Autocomplete against suggested options?

We have an autocomplete input with required validation. When a user searches for an option by entering a query (but doesn't pick any of the options) then the input is valid, even though it doesn't match any of the suggested options. What I want to…
klevendoglu
  • 592
  • 1
  • 6
  • 18
31
votes
7 answers

How to use mat-tab? mat-tab is not a known element error

I am trying to use mat-tab. I have added the below code in html
Nancy
  • 911
  • 7
  • 26
  • 54
31
votes
6 answers

Angular Material distinct mat-sort on multiple tables

No problem with separate/distinct pagination on multiple Material tables in Augular. But sorting separate tables on a page is not as simple it seems. Can someone please point us to a working example of multiple table sorting using the Material…
Kirk
  • 541
  • 1
  • 4
  • 10
31
votes
15 answers

angular2 material table hide column

I have the following angular2 material table