Questions tagged [angular-resolver]
135 questions
1
vote
2 answers
Angular 2 route resolver not working, browser blank and no errors in console
I implemented a route resolver but the entire target component (events-list.component.ts) is not shown in the browser. I only see the navbar. As shown below, the resolver gets the list of events from the events service. And no errors are shown in…

Raj Narayanan
- 2,443
- 4
- 24
- 43
1
vote
0 answers
Angular + Contentful: Access Component input in resolve
On my homepage I have a component that gets the top 3 latest posts from an API call:
Inside the .ts file I get the posts like so:
posts: Object;
const().......
this.posts = this.route.snapshot.data.data;
The call…

modusTollens
- 397
- 7
- 23
1
vote
3 answers
How to return HttpClient response body from a request?
I have a component that relies on an API response for its content. I have set up the resolver but it still returns before my data is ready.
How can I make my pull_categories() function wait until the response body is received and then return? Rather…

Zana Daniel
- 301
- 1
- 4
- 13
1
vote
1 answer
how to deny the route to switch until has data in store with ngrx and resolve?
i want to deny the user from getting to route until i have data in my store.
i tried with resolver but it still go to the route and im getting an error because im using this data in the state effect .
i searched in the web but i not see example that…

Alex Koretzki
- 155
- 2
- 11
1
vote
2 answers
Angular6 Synchronously Load Route Data
Okay, I recently implemented SSR into my Angular6 application, with the intention of rendering dynamic HTML in a crawlable manner. All seems to be working fine, but my issue is rendering data from an API endpoint.
As soon as a user arrives on my…

Ben Henderson
- 333
- 1
- 5
- 15
1
vote
1 answer
Angular Router Event does not ended
I have a problem when rendering my "Product Edit Page" when I click a specific item in my list.
I have a method from a service that retrieves a specific data from firebase firestore.
product.service.ts
/**
* Get specific product
*/
getProduct(guid:…

klaydze
- 941
- 14
- 36
1
vote
1 answer
Angular6 Resolver not working, resolver not sending data to the component
I've got a project in Angular6, and I'm using a resolver to fetch data before component gets loaded but it's not working properly. The resolver is being called but I'm not getting any data in the component.
Here the stackblitz link :…

TheTom
- 298
- 3
- 15
0
votes
0 answers
How to convert deprecated resolver using Resolve interface to use the ResolveFn syntax?
[SOLVED]
Original :
export enum RecipeActions {
SET_RECIPES = '[RECIPES] SET_RECIPES',
FETCH_RECIPES = '[RECIPES] SET_RECIPES', // MISSED THIS
ADD_SINGLE = '[RECIPES] ADD_SINGLE',
ADD_MULTI = '[RECIPES] ADD_MULTI',
DELETE = '[RECIPES]…

leroyv
- 63
- 5
0
votes
0 answers
Re-fetching resolved data for child component
I have a parent component that loads child components conditionally. One of them being:
There are no child routes for the parent component. The route has a…

Jnr
- 1,504
- 2
- 21
- 36
0
votes
0 answers
Angular route - combine data from multiple resolvers
I have this route:
path: 'route-to',
component: component,
resolve: { model: resolver },
data: { resolvedata: 'module_name'}
In resolver's resolve method I have an http call:
const moduleName = route.data.resolvedata;
const translationUrl =…

Mark
- 4,535
- 7
- 39
- 76
0
votes
0 answers
Is it possible to get runGuardsAndResolvers: "always" to apply to only one resolver and not the rest?
Here's my component:
{
path:"aaaa",
component: aaaa,
data: {
message: "this is aaaa"
},
resolve: {
setDraftResolver: SetDraftResolver, // I want this to run as normal
draft: GetDraftResolver, // I want…

Jerome
- 734
- 1
- 8
- 28
0
votes
2 answers
Angular Resolver does not hit API when reloading the page?
I've used resolver for one of my component. when navigate from component to route it works fine. but when I reload the page it does not hit API. it gives me the uncaught error.
This my list
when i click the button it goes to this route
but when I…

Mh Dip
- 351
- 3
- 15
0
votes
0 answers
How to updated data from Observable streams by ActivatedRoute from resolver Angular Firestore?
I want to get observable data from the backend Firestore through resolver.guard to the component via ActivatedRoute.
I managed to get the first data, but it is not updating to changes.
When visiting the page, the component can retrieve the data but…

syahiruddin
- 401
- 5
- 14
0
votes
0 answers
How to handle http requests from ngrx/effects in a route resolver?
I'm writing an angular app in which it initially sets an array of movies into my app state. I do this via a Ngrx action and get the movies through a http request in the relative effect to that action. Then, I use this movies state to render all…

Mister Killuminati
- 21
- 5
0
votes
1 answer
Execute Resolvers in Route Hierarchy in Parallel in Angular?
With a hierarchical route structure, I would like to get the resolvers along a particular branch to execute in parallel.
The Setup
Currently I have my routing setup like this:
app-routing.module.ts:
const routes: Routes = [
{
path: 'route1',
…

Paul
- 31
- 3