ngrx / store-devtools

Developer Tools for @ngrx/store
MIT License
325 stars 38 forks source link

Are your new modules shouldn't have schemas : [CUSTOM_ELEMENTS_SCHEMA] ? #28

Closed sixrandanes closed 8 years ago

sixrandanes commented 8 years ago

Hello,

When i am using your new modules (Angular2@rc5), everything works fine in dev mode. But when I build my dist, I got an ugly error :

Can't bind to 'visible' since it isn't a known property of 'ngrx-dock'.

  1. If 'ngrx-dock' is an Angular component and it has 'visible' input, then verify that it is part of this module.
  2. If 'ngrx-dock' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("rtcut]="positionCommand" (command)="changePosition$.next($event)">

If i put [CUSTOM_ELEMENTS_SCHEMA], in all of your modules (store-devtools, store-log-monitor, dock-monitor, etc...), everything works fine.

The point is : Maybe I shouldn't have these modules in my appplication module, since it has to be in production, and remove this code when I build my dist ?

StoreDevtoolsModule.instrumentStore({ monitor: useLogMonitor({ visible: true, position: 'right' }) }), StoreLogMonitorModule

MikeRyanDev commented 8 years ago

Angular 2 RC 5 broke when the application was minified. Upgrade to Angular 2 RC6 to resolve this problem.

sixrandanes commented 8 years ago

thank you for your quick response.