Skip to content

Commit f16f2ff

Browse files
committed
docs(angular-devtools): update docs
1 parent c52c310 commit f16f2ff

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

docs/framework/angular/adapter.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm install @tanstack/angular-devtools
1313

1414
## Component Inputs
1515

16-
The `TanStackDevtoolsComponent` (selector: `tanstack-devtools`) accepts the following signal-based inputs, defined by the `TanStackDevtoolsAngularInit` interface:
16+
The `TanStackDevtools` (selector: `tanstack-devtools`) accepts the following signal-based inputs, defined by the `TanStackDevtoolsAngularInit` interface:
1717

1818
| Input | Type | Description |
1919
| --- | --- | --- |
@@ -28,19 +28,19 @@ Each plugin in the `plugins` array must conform to the `TanStackDevtoolsAngularP
2828
```ts
2929
type TanStackDevtoolsAngularPlugin = {
3030
id?: string
31-
component: Type<any>
31+
render: TanStackDevtoolsAngularPluginRender
3232
name: string | Type<any>
3333
inputs?: Record<string, any>
3434
defaultOpen?: boolean
3535
}
3636
```
3737
38-
| Field | Type | Description |
39-
| --- | --- | --- |
40-
| `id` | `string` (optional) | Unique identifier for the plugin. |
41-
| `component` | `Type<any>` | The Angular component class to render as the plugin panel content. |
42-
| `name` | `string \| Type<any>` | Display name for the tab title. Can be a plain string or an Angular component class for custom rendering. |
43-
| `inputs` | `Record<string, any>` (optional) | Additional inputs passed to the plugin component via `setInput()`. |
38+
| Field | Type | Description |
39+
|---------------| --- | --- |
40+
| `id` | `string` (optional) | Unique identifier for the plugin. |
41+
| `render` | `Type<any>` | The Angular component class to render as the plugin panel content. |
42+
| `name` | `string \| Type<any>` | Display name for the tab title. Can be a plain string or an Angular component class for custom rendering. |
43+
| `inputs` | `Record<string, any>` (optional) | Additional inputs passed to the plugin component via `setInput()`. |
4444
| `defaultOpen` | `boolean` (optional) | Whether this plugin tab should be open by default. |
4545
4646
## Key Differences from Other Frameworks
@@ -49,22 +49,22 @@ The Angular adapter uses `component` (an Angular component class reference) inst
4949
5050
```typescript
5151
import { Component } from '@angular/core'
52-
import { TanStackDevtoolsComponent } from '@tanstack/angular-devtools'
52+
import { TanStackDevtools } from '@tanstack/angular-devtools'
5353
import { AngularQueryDevtoolsPanel } from '@tanstack/angular-query-devtools'
5454

5555
@Component({
5656
selector: 'app-root',
5757
standalone: true,
58-
imports: [TanStackDevtoolsComponent],
58+
imports: [TanStackDevtools],
5959
template: `
6060
<tanstack-devtools [plugins]="plugins" />
6161
`,
6262
})
63-
export class AppComponent {
63+
export class App {
6464
plugins = [
6565
{
6666
name: 'Angular Query',
67-
component: AngularQueryDevtoolsPanel,
67+
render: AngularQueryDevtoolsPanel,
6868
inputs: { style: 'height: 100%' },
6969
},
7070
]
@@ -75,7 +75,7 @@ export class AppComponent {
7575

7676
The `@tanstack/angular-devtools` package exports:
7777

78-
- **`TanStackDevtoolsComponent`** -- The main Angular standalone component that renders the devtools panel.
78+
- **`TanStackDevtools`** -- The main Angular standalone component that renders the devtools panel.
7979
- **`TanStackDevtoolsAngularPlugin`** (type) -- The type for plugin definitions.
8080
- **`TanStackDevtoolsAngularInit`** (type) -- The inputs interface for the `TanStackDevtoolsComponent`.
8181

docs/framework/angular/basic-setup.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ import { TanStackDevtoolsComponent } from '@tanstack/angular-devtools'
2222
@Component({
2323
selector: 'app-root',
2424
standalone: true,
25-
imports: [TanStackDevtoolsComponent],
25+
imports: [TanStackDevtools],
2626
template: `
2727
<app-content />
2828
<tanstack-devtools />
2929
`,
3030
})
31-
export class AppComponent {}
31+
export class App {}
3232
```
3333

34-
Import the desired devtools and provide them to the `TanStackDevtoolsComponent` via the `[plugins]` input along with a label for the menu.
34+
Import the desired devtools and provide them to the `TanStackDevtools` via the `[plugins]` input along with a label for the menu.
3535

3636
```typescript
3737
import { Component } from '@angular/core'
38-
import { TanStackDevtoolsComponent } from '@tanstack/angular-devtools'
38+
import { TanStackDevtools } from '@tanstack/angular-devtools'
3939
import type { TanStackDevtoolsAngularPlugin } from '@tanstack/angular-devtools'
4040
import { AngularQueryDevtoolsPanel } from '@tanstack/angular-query-devtools'
4141

4242
@Component({
4343
selector: 'app-root',
4444
standalone: true,
45-
imports: [TanStackDevtoolsComponent],
45+
imports: [TanStackDevtools],
4646
template: `
4747
<app-content />
4848
<tanstack-devtools [plugins]="plugins" />
@@ -52,12 +52,10 @@ export class AppComponent {
5252
plugins: Array<TanStackDevtoolsAngularPlugin> = [
5353
{
5454
name: 'Angular Query',
55-
component: AngularQueryDevtoolsPanel,
55+
render: AngularQueryDevtoolsPanel,
5656
},
5757
]
5858
}
5959
```
6060

61-
> Note: The Angular adapter uses `component` (an Angular component class) instead of `render` (a JSX element) in plugin definitions. Additional inputs can be provided via the `inputs` field and are bound to the component with `setInput()`.
62-
63-
Finally, add any additional configuration you desire to the `TanStackDevtoolsComponent`. More information can be found under the [TanStack Devtools Configuration](../../configuration) section.
61+
Finally, add any additional configuration you desire to the `TanStackDevtools`. More information can be found under the [TanStack Devtools Configuration](../../configuration) section.

docs/framework/angular/guides/custom-plugins.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ import { DevtoolsEventClient } from './eventClient'
126126
</div>
127127
`,
128128
})
129-
export class DevtoolPanelComponent implements OnInit, OnDestroy {
129+
export class DevtoolPanel implements OnInit, OnDestroy {
130130
state = signal<{ count: number; history: number[] } | undefined>(undefined)
131131
private cleanup?: () => void
132132

@@ -153,29 +153,29 @@ This step follows what's shown in [basic-setup](../basic-setup) for a more docum
153153
app.component.ts
154154
```typescript
155155
import { Component } from '@angular/core'
156-
import { TanStackDevtoolsComponent } from '@tanstack/angular-devtools'
156+
import { TanStackDevtools } from '@tanstack/angular-devtools'
157157
import type { TanStackDevtoolsAngularPlugin } from '@tanstack/angular-devtools'
158158
import { DevtoolPanelComponent } from './devtool-panel.component'
159159

160160
@Component({
161161
selector: 'app-root',
162162
standalone: true,
163-
imports: [TanStackDevtoolsComponent],
163+
imports: [TanStackDevtools],
164164
template: `
165165
<app-content />
166166
<tanstack-devtools [plugins]="plugins" />
167167
`,
168168
})
169169
export class AppComponent {
170170
plugins: Array<TanStackDevtoolsAngularPlugin> = [
171-
{ name: 'Custom devtools', component: DevtoolPanelComponent },
171+
{ name: 'Custom devtools', component: DevtoolPanel },
172172
]
173173
}
174174
```
175175

176176
## Debugging
177177

178-
Both the `TanStackDevtoolsComponent` and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.
178+
Both the `TanStackDevtools` and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.
179179

180180
TanStackDevtools debugging mode can be activated like so:
181181
```typescript
@@ -188,9 +188,9 @@ TanStackDevtools debugging mode can be activated like so:
188188
`,
189189
imports: [TanStackDevtoolsComponent],
190190
})
191-
export class AppComponent {
191+
export class App {
192192
plugins: Array<TanStackDevtoolsAngularPlugin> = [
193-
{ name: 'Custom devtools', component: DevtoolPanelComponent },
193+
{ name: 'Custom devtools', component: DevtoolPanel },
194194
]
195195
}
196196
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "configPath": "..\\..\\dist\\server\\wrangler.json", "auxiliaryWorkers": [] }
1+
{"configPath":"../../dist/server/wrangler.json","auxiliaryWorkers":[]}

0 commit comments

Comments
 (0)