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

post.component.html

20 lines421 Bytes

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