Skip to content

Commit

Permalink
fix: point service at actual endpoint/service, store at actual servic…
Browse files Browse the repository at this point in the history
…e for RXJS `withDataService`
  • Loading branch information
michael-small committed Aug 27, 2024
1 parent a99c0e7 commit 47fc853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FlightService } from '../shared/flight.service';
import { FlightService, FlightServiceRXJS } from '../shared/flight.service';

import { signalStore } from '@ngrx/signals';

Expand Down Expand Up @@ -26,7 +26,7 @@ export const SimpleFlightBookingStoreWithObservables = signalStore(
withCallState(),
withEntities<Flight>(),
withDataService({
dataServiceType: FlightService,
dataServiceType: FlightServiceRXJS,
filter: { from: 'Paris', to: 'New York' },
}),
withUndoRedo(),
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/shared/flight.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class FlightService implements DataService<Flight, FlightFilter> {
providedIn: 'root'
})
export class FlightServiceRXJS implements DataService<Flight, FlightFilter> {
private baseUrl = 'http://localhost:3000/books';
private baseUrl = `https://demo.angulararchitects.io/api`;
private http = inject(HttpClient);

loadById(id: EntityId): Observable<Flight> {
Expand Down

0 comments on commit 47fc853

Please sign in to comment.