I made the mistake of updating my Angular project to the latest version, fully aware that it would be a challenging process. Unfortunately, things are going as expected.
An unfamiliar error has surfaced in my console despite the app compiling successfully. However, the browser is not displaying anything and this error persists.
I will provide all relevant information I can gather but have yet to find a solution for this issue.
Any assistance or guidance on this matter would be greatly appreciated.
Uncaught Error: Type MatDialogRef does not have 'ɵmod' property.
at getNgModuleDef (core.js:1022)
at recurse (core.js:24966)
at recurse (core.js:24977)
at registerNgModuleType (core.js:24962)
at new NgModuleFactory$1 (core.js:25076)
at compileNgModuleFactory__POST_R3__ (core.js:28679)
at PlatformRef.bootstrapModule (core.js:28922)
at Module.zUnb (main.ts:11)
at __webpack_require__ (bootstrap:79)
at Object.0 (main.js:475)
package.json
"dependencies": {
"@angular-devkit/core": "^11.2.2",
... // The rest of the package.json remains the same
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.2",
... // The rest of the devDependencies information stays unchanged
}
app.module.ts
import {MatDialogModule, MatDialogRef} from '@angular/material/dialog';
imports: [
MatDialogRef],
providers: [LocationService,
{provide: LocationStrategy, useClass: HashLocationStrategy},
{ provide: MatDialogRef, useValue: {} }]
implementation
import {MatDialogRef} from '@angular/material/dialog';
export class DialogComponent implements AfterViewInit{}
constructor(public dialogRef: MatDialogRef<DialogComponent>
this.dialogRef.afterClosed().subscribe((sendNow) => {...}