examples/angular/dynamic-devtools
| Name | Last commit message | Last commit date |
|---|---|---|
| .. | ||
README.md
TanStack Angular Query Dynamic Devtools Example#
Loads the devtools on demand in a production build with a keyboard shortcut.
How it works#
src/app/devtools-options.manager.tsis an@InjectableDevtoolsOptionsManagerwhoseloadDevtoolssignal becomestruethe first time β Ctrl Shift D is pressed. It is built withfromEvent,scanandtoSignal.src/app/app.config.tsimportswithDevtoolsfrom@tanstack/angular-query-devtools/production, so the devtools are also available in production builds, and passes the signal as theloadDevtoolsoption in an options function that can callinject.src/app/components/dynamic-devtools-example.component.tsreads theTanStack/queryrepository withinjectQuery,HttpClientandlastValueFrom, so the devtools have a query to show.
To run this example:
npm installnpm start
To try the shortcut in a production build, run npm start -- --configuration production.