Skip to content

feat(progress-bar): Add a way to define default options to material progress bar #23329

@mrmokwa

Description

@mrmokwa

Feature Description

It would be helpful to have a way do define for all progress bar some default options, like mode and color.

Something similar to:
import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
or
import { MAT_PAGINATOR_DEFAULT_OPTIONS } from '@angular/material/paginator';

Use Case

In my app I only use color="accent" and mode="indeterminate".

<mat-progress-bar *ngIf="loading$ | async" mode="indeterminate" color="accent"></mat-progress-bar>

If I had an option to configure default options, like snackbar or paginator, I could use something like the example below and continue to have the same result.

<mat-progress-bar *ngIf="loading$ | async"></mat-progress-bar>

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/progress-barfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions