(() => `${url}${flightTo()}`, {
+ defaultValue: [],
+ }),
+ })),
+);
+
+@Component({
+ selector: 'demo-with-resource',
+ imports: [JsonPipe],
+ template: `,
+ withResource
+ withResource doc page
+
+ Single Resource
+ value: {{ store.value() | json }}
+ status: {{ store.status() }}
+ error: {{ store.error() | json }}
+ hasValue: {{ store.hasValue() }}
+
+ Named Resource
+ {{ store.listValue() | json }}
+ status: {{ store.listStatus() }}
+ error: {{ store.listError() | json }}
+ hasValue: {{ store.listHasValue() }} `,
+ providers: [FlightStore],
+})
+export class WithResourceComponent {
+ store = inject(FlightStore);
+}