I'm currently attempting to follow a tutorial on Angular Material pagination, but I keep encountering this error:
ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[MatTable -> _CoalescedStyleScheduler]:
StaticInjectorError(Platform: core)[MatTable -> _CoalescedStyleScheduler]:
NullInjectorError: No provider for _CoalescedStyleScheduler!
This error prevents the page from rendering properly. Here is the snippet of code causing the issue:
<mat-paginator [length] = "100" [pageSize] = "10" [pageSizeOptions] = "[5, 10, 25, 100]" (page) = "pageEvent = $event"></mat-paginator>
Even though I have imported all necessary modules as instructed in the tutorial.
UPDATE Here are the dependencies listed in my project:
"dependencies": {
// List of dependencies...
},
UPDATE 2 After importing the _CoalescedStyleScheduler, I encountered another error:
ERROR in ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve '@angular/cdk/table/coalesced-style-scheduler' in 'C:\Users\Username\Documents\Project1\frontend\src\app'
// Additional errors related to resource locking or being busy.
UPDATE 3 Here is a snippet from my app.module.ts file:
// Imports and declarations...
@NgModule({
// Module configuration...
})
export class AppModule {
title = 'App';
}