Skip to content

Commit

Permalink
refactor(Devtools): Show complex structures in monitor (#79)
Browse files Browse the repository at this point in the history
This will not serialize the data before sending it to the Devtools extension, allowing it to handle complex structures including circular references
from the RouterState when using @ngrx/router-store.
  • Loading branch information
brandonroberts authored and MikeRyanDev committed Jul 14, 2017
1 parent f22d2c3 commit 3827947
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example-app/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { environment } from '../environments/environment';
/**
* @ngrx/router-store keeps router state up-to-date in the store.
*/
// StoreRouterConnectingModule,
StoreRouterConnectingModule,

/**
* Store devtools instrument the store retaining past versions of state
Expand Down
2 changes: 1 addition & 1 deletion example-app/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const routes: Routes = [
{ path: '', redirectTo: '/books', pathMatch: 'full' },
{
path: 'books',
loadChildren: 'app/books/books.module#BooksModule',
loadChildren: './books/books.module#BooksModule',
canActivate: [AuthGuard],
},
{ path: '**', component: NotFoundPageComponent },
Expand Down
9 changes: 7 additions & 2 deletions modules/store-devtools/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface ReduxDevtoolsExtension {
send(
action: any,
state: any,
shouldStringify?: boolean,
options?: boolean | { serialize: boolean | object },
instanceId?: string
): void;
}
Expand All @@ -60,7 +60,12 @@ export class DevtoolsExtension {
return;
}

this.devtoolsExtension.send(null, state, false, this.instanceId);
this.devtoolsExtension.send(
null,
state,
{ serialize: false },
this.instanceId
);
}

private createChangesObservable(): Observable<any> {
Expand Down

0 comments on commit 3827947

Please sign in to comment.