-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
docsThis issue is related to documentationThis issue is related to documentationneeds triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
Description
Documentation Feedback
Documentation suggests to add MAT_SNACK_BAR_DEFAULT_OPTIONS to ngModule, but not in the case of standalone component.
If you add this provide to standalone component it seems to be not working...
@NgModule({
providers: [
{provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: {duration: 2500}}
]
})
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
standalone: true,
providers: [{provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { verticalPosition: "top" }}],
imports: [...]
})
Affected documentation page
https://material.angular.dev/components/snack-bar/overview#setting-the-global-configuration-defaults
Metadata
Metadata
Assignees
Labels
docsThis issue is related to documentationThis issue is related to documentationneeds triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team