I'm trying to use angular material progress bar, i have used this code in app.module.ts
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatProgressBarModule } from '@angular/material/progress-bar';
],
imports: [
MatProgressBarModule
],
calling progress bar like this in app.component.html
<mat-progress-bar mode="determinate" value="100"></mat-progress-bar>
it is working in this component but i want to call in other component using the same code but not getting called.
Getting this error:
mat-progress-bar is not a known element
CodePudding user response:
If the other component is in a different module then you must include MatProgressBarModule in that module's imports array.