Skip to content

Commit 2786196

Browse files
authoredJul 19, 2024··
docs: update the syntax highlighting for angular (#7762)
1 parent b189e31 commit 2786196

11 files changed

+19
-19
lines changed
 

‎docs/framework/angular/devtools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Floating Mode will mount the devtools as a fixed, floating element in your app a
2929

3030
Place the following code as high in your Angular app as you can. The closer it is to the root of the page, the better it will work!
3131

32-
```ts
32+
```angular-ts
3333
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
3434
import { Component } from '@angular/core';
3535

‎docs/framework/angular/guides/background-fetching-indicators.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ref: docs/framework/react/guides/background-fetching-indicators.md
66

77
[//]: # 'Example'
88

9-
```ts
9+
```angular-ts
1010
@Component({
1111
selector: 'posts',
1212
template: `
@@ -39,7 +39,7 @@ export class TodosComponent {
3939
[//]: # 'Example'
4040
[//]: # 'Example2'
4141

42-
```ts
42+
```angular-ts
4343
import { injectIsFetching } from '@tanstack/angular-query-experimental'
4444
4545
@Component({

‎docs/framework/angular/guides/disabling-queries.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace: { 'useQuery': 'injectQuery' }
77

88
[//]: # 'Example'
99

10-
```ts
10+
```angular-ts
1111
@Component({
1212
selector: 'todos',
1313
template: `<div>
@@ -44,7 +44,7 @@ export class TodosComponent {
4444
[//]: # 'Example'
4545
[//]: # 'Example2'
4646

47-
```ts
47+
```angular-ts
4848
@Component({
4949
selector: 'todos',
5050
template: `
@@ -69,7 +69,7 @@ export class TodosComponent {
6969
[//]: # 'Example2'
7070
[//]: # 'Example3'
7171

72-
```ts
72+
```angular-ts
7373
@Component({
7474
selector: 'todos',
7575
template: `

‎docs/framework/angular/guides/infinite-queries.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ replace:
88

99
[//]: # 'Example'
1010

11-
```ts
11+
```angular-ts
1212
import { Component, computed, inject } from '@angular/core'
1313
import { injectInfiniteQuery } from '@tanstack/angular-query-experimental'
1414
import { lastValueFrom } from 'rxjs'
@@ -48,7 +48,7 @@ export class Example {
4848
}
4949
```
5050

51-
```html
51+
```angular-html
5252
<div>
5353
@if (query.isPending()) {
5454
<p>Loading...</p>
@@ -70,7 +70,7 @@ export class Example {
7070
[//]: # 'Example'
7171
[//]: # 'Example1'
7272

73-
```ts
73+
```angular-ts
7474
@Component({
7575
template: ` <list-component (endReached)="fetchNextPage()" /> `,
7676
})

‎docs/framework/angular/guides/mutations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ replace:
1414

1515
[//]: # 'Example'
1616

17-
```ts
17+
```angular-ts
1818
@Component({
1919
template: `
2020
<div>
@@ -45,7 +45,7 @@ export class TodosComponent {
4545
[//]: # 'Example2'
4646
[//]: # 'Example3'
4747

48-
```ts
48+
```angular-ts
4949
@Component({
5050
standalone: true,
5151
selector: 'todo-item',

‎docs/framework/angular/guides/optimistic-updates.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ addTodo = injectMutation(() => ({
2828
[//]: # 'ExampleUI1'
2929
[//]: # 'ExampleUI2'
3030

31-
```ts
31+
```angular-ts
3232
@Component({
3333
template: `
3434
@for (todo of todos.data(); track todo.id) {
@@ -45,7 +45,7 @@ class TodosComponent {}
4545
[//]: # 'ExampleUI2'
4646
[//]: # 'ExampleUI3'
4747

48-
```ts
48+
```angular-ts
4949
@Component({
5050
template: `
5151
@if (addTodo.isError()) {

‎docs/framework/angular/guides/paginated-queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const result = injectQuery(() => ({
2222
[//]: # 'Example'
2323
[//]: # 'Example2'
2424

25-
```ts
25+
```angular-ts
2626
@Component({
2727
selector: 'pagination-example',
2828
template: `

‎docs/framework/angular/guides/queries.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ result = injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodoList }))
3333
[//]: # 'Example2'
3434
[//]: # 'Example3'
3535

36-
```ts
36+
```angular-ts
3737
@Component({
3838
selector: 'todos',
3939
standalone: true,
@@ -66,7 +66,7 @@ If booleans aren't your thing, you can always use the `status` state as well:
6666

6767
[//]: # 'Example4'
6868

69-
```ts
69+
```angular-ts
7070
@Component({
7171
selector: 'todos',
7272
standalone: true,

‎docs/framework/angular/guides/query-cancellation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ You might want to cancel a query manually. For example, if the request takes a l
8181

8282
[//]: # 'Example7'
8383

84-
```ts
84+
```angular-ts
8585
@Component({
8686
standalone: true,
8787
template: `<button (click)="onCancel()">Cancel</button>`,

‎docs/framework/angular/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ In the example below, you can see Angular Query in its most basic and simple for
6060

6161
[Open in CodeSandbox](https://codesandbox.io/s/github/tanstack/query/tree/main/examples/angular/simple)
6262

63-
```ts
63+
```angular-ts
6464
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
6565
import { ChangeDetectionStrategy, Component, inject } from '@angular/core'
6666
import { HttpClient } from '@angular/common/http'

‎docs/framework/angular/quick-start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class AppModule {}
4343

4444
### Component with query and mutation
4545

46-
```ts
46+
```angular-ts
4747
import { Component, Injectable, inject } from '@angular/core'
4848
import { HttpClient } from '@angular/common/http'
4949
import { lastValueFrom } from 'rxjs'

0 commit comments

Comments
 (0)
Please sign in to comment.