Last active
December 14, 2017 00:55
-
-
Save zbarbuto/9bc0826ec87eb9451e6a59bdf2836d4a to your computer and use it in GitHub Desktop.
Ionic ngrx/store Remote Devtools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { RemoteDevToolsProxy } from './remote-devtools-proxy'; | |
// ... | |
// Register our remote devtools if we're on-device and not in a browser | |
if (!window['devToolsExtension'] && !window['__REDUX_DEVTOOLS_EXTENSION__']) { | |
let remoteDevToolsProxy = new RemoteDevToolsProxy({ | |
connectTimeout: 300000, // extend for pauses during debugging | |
ackTimeout: 120000, // extend for pauses during debugging | |
secure: false // dev only | |
}); | |
// support both the legacy and new keys, for now | |
window['devToolsExtension'] = remoteDevToolsProxy; | |
window['__REDUX_DEVTOOLS_EXTENSION__'] = remoteDevToolsProxy; | |
} | |
@NgModule({ | |
declarations: [MyApp], | |
// ... | |
StoreDevtoolsModule.instrument(), | |
// ... | |
}) | |
export class AppModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment