...

/

Fetching Component Data in the Route using Reactive Selectors

Fetching Component Data in the Route using Reactive Selectors

Let's use a "Resolver" to fetch custom data regarding the address and credit card details.

Using dropdown selectors

The address and credit card inputs are simplified to just dropdowns in this example, filled in with data fetched from the server.

While you could add a few ajax calls in the component itself, Angular’s routing allows you to define the async data as component needs and load it alongside all of the other data that component needs. This can be used to gracefully handle errors and redirect as the component loads.

To fetch custom data during the ...