Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

post.component.html

19 lines414 Bytes

1<div>
2 <div>
3 <a routerLink="/" href="#">Back</a>
4 </div>
5 @if (postQuery.status() === 'pending') {
6 Loading...
7 } @else if (postQuery.status() === 'error') {
8 Error: {{ postQuery.error()?.message }}
9 }
10 @if (postQuery.data(); as post) {
11 <h1>{{ post.title }}</h1>
12 <div>
13 <p>{{ post.body }}</p>
14 </div>
15 @if (postQuery.isFetching()) {
16 Background Updating...
17 }
18 }
19</div>