michaeldoye / mat-progress-buttons

Very simple Angular6+ Material Design progress buttons
https://mat-progress-buttons.firebaseapp.com/
MIT License
110 stars 54 forks source link

NullInjectorError after upgrade to version 9.3.1 with Angular 12 #86

Closed lujakob closed 3 years ago

lujakob commented 3 years ago

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting

OS and Version?

Mac OS in Chrome

Versions

Package Version

@angular-devkit/architect 0.1201.4 @angular-devkit/build-angular 12.1.4 @angular-devkit/core 8.3.29 @angular-devkit/schematics 8.3.29 @angular/cdk 12.1.0 @angular/flex-layout 9.0.0-beta.31 @angular/material 12.1.0 @schematics/angular 8.3.29 rxjs 6.6.7 typescript 4.3.4

Repro steps

Install mat-progress-buttons 9.3.1 and load page that contains a spinner button

The log given by the failure

Desired functionality

Mention any other details that might be useful

Bildschirmfoto 2021-07-30 um 14 23 38
bartez commented 3 years ago

Did you use MatProgressButtonsModule.forRoot() function in your app.module.ts like:

import { MatProgressButtonsModule } from 'mat-progress-buttons';

@NgModule({
  declarations: [AppComponent, ...],
  imports: [MatProgressButtonsModule.forRoot(), ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
} 
lujakob commented 3 years ago

@bartez using ".forRoot()" in app.module.ts worked. Apparently up until version 9.2.1 it worked without it, that's why we did not have it applied.