ngrx / store-log-monitor

Log Monitor for @ngrx/store-devtools and Angular
MIT License
63 stars 18 forks source link

chore: Upgrade to Angular 2 RC.5 #3

Closed MikeRyanDev closed 7 years ago

MikeRyanDev commented 7 years ago

Upgrades the store log monitor to Angular RC.5

BREAKING CHANGE:

With the introduction of NgModules, setting up StoreLogMonitor has changed.

Before:

import { instrumentStore } from '@ngrx/store-devtools';
import { useLogMonitor, StoreLogMonitorComponent } from '@ngrx/store-log-monitor';

@Component({
  providers: [
    instrumentStore({ monitor: useLogMonitor() })
  ],
  directives: [
    StoreLogMonitorComponent
  ]
})
export class AppComponent { }

After:

import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { StoreLogMonitorModule, useLogMonitor } from '@ngrx/store-log-monitor';

@NgModule({
  imports: [
    StoreDevtoolsModule.instrumentStore({ monitor: useLogMonitor() }),
    StoreLogMonitorModule
  ]
})
export class AppModule { }
brandonroberts commented 7 years ago

Test suite is broken unless I install zone.js@0.6.12. Otherwise LGTM

  Uncaught Error: Missing: SyncTestZoneSpec
  at /projects/ngrx/store-log-monitor/tests.js:9418 <- webpack:///~/zone.js/dist/jasmine-patch.js:66:0