Skip to content

StaticInjectorError(AppModule)[MatDialogTitle -> MatDialogRef] #13731

@Jonesie

Description

@Jonesie

Bug, feature request, or proposal:

Bug?? Either that or Ive done something wrong

What is the expected behavior?

No error when loading

What is the current behavior?

On app startup Im seeing:

StaticInjectorError(AppModule)[MatDialogTitle -> MatDialogRef]

Full error is:
core.js:12301 ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[MatDialogTitle -> MatDialogRef]: StaticInjectorError(Platform: core)[MatDialogTitle -> MatDialogRef]: NullInjectorError: No provider for MatDialogRef! Error: StaticInjectorError(AppModule)[MatDialogTitle -> MatDialogRef]: StaticInjectorError(Platform: core)[MatDialogTitle -> MatDialogRef]: NullInjectorError: No provider for MatDialogRef! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:691) at resolveToken (core.js:928) at tryResolveToken (core.js:872) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:769) at resolveToken (core.js:928) at tryResolveToken (core.js:872) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:769) at resolveNgModuleDep (core.js:17435) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:18124) at resolveDep (core.js:18495) at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:691) at resolveToken (core.js:928) at tryResolveToken (core.js:872) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:769) at resolveToken (core.js:928) at tryResolveToken (core.js:872) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:769) at resolveNgModuleDep (core.js:17435) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:18124) at resolveDep (core.js:18495) at resolvePromise (zone.js:814) at resolvePromise (zone.js:771) at zone.js:873 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:13842) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at drainMicroTaskQueue (zone.js:595) at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500) at invokeTask (zone.js:1540)

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular Material: 6.4.7 and 7.0
Angular 7.0.2
Windows 10
Typescript 3.0.3
Chrome

Is there anything else we should know?

Everything was fine until I updated to Angular 6.4.7 (and whatever version of Material went with that). Tried v 7 and no difference.

Ive checked that Im refering to MatDialogModule everywhere but I dont fully understand what the issue is since the error message ios somewhat cryptic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions