Skip to content

Commit 3827947

Browse files
brandonrobertsMikeRyanDev
authored andcommitted
refactor(Devtools): Show complex structures in monitor (#79)
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.
1 parent f22d2c3 commit 3827947

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

example-app/app/app.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { environment } from '../environments/environment';
4242
/**
4343
* @ngrx/router-store keeps router state up-to-date in the store.
4444
*/
45-
// StoreRouterConnectingModule,
45+
StoreRouterConnectingModule,
4646

4747
/**
4848
* Store devtools instrument the store retaining past versions of state

example-app/app/routes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const routes: Routes = [
66
{ path: '', redirectTo: '/books', pathMatch: 'full' },
77
{
88
path: 'books',
9-
loadChildren: 'app/books/books.module#BooksModule',
9+
loadChildren: './books/books.module#BooksModule',
1010
canActivate: [AuthGuard],
1111
},
1212
{ path: '**', component: NotFoundPageComponent },

modules/store-devtools/src/extension.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface ReduxDevtoolsExtension {
3535
send(
3636
action: any,
3737
state: any,
38-
shouldStringify?: boolean,
38+
options?: boolean | { serialize: boolean | object },
3939
instanceId?: string
4040
): void;
4141
}
@@ -60,7 +60,12 @@ export class DevtoolsExtension {
6060
return;
6161
}
6262

63-
this.devtoolsExtension.send(null, state, false, this.instanceId);
63+
this.devtoolsExtension.send(
64+
null,
65+
state,
66+
{ serialize: false },
67+
this.instanceId
68+
);
6469
}
6570

6671
private createChangesObservable(): Observable<any> {

0 commit comments

Comments
 (0)