import {
ChangeDetectionStrategy,
Component,
Injector,
computed,
effect,
inject,
signal,
viewChild,
} from '@angular/core'
import { ExampleQueryComponent } from './example-query.component'
import type { ElementRef } from '@angular/core'
import type { DevtoolsPanelRef } from '@tanstack/angular-query-devtools-experimental'
@Component({
selector: 'lazy-load-devtools-panel-example',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
In this example, the devtools panel is loaded programmatically when the button is clicked. In addition, the code is lazy loaded.
@if (isOpen()) { } `, imports: [ExampleQueryComponent], }) export default class LazyLoadDevtoolsPanelExampleComponent { readonly isOpen = signal(false) readonly devtools = signal