Questions tagged [angular-resolver]

135 questions
4
votes
2 answers

Resolver does not resolve if another data stream is added

I am trying to use a resolver in order to retrieve data depending on the given parameters the route holds. Unfortunately, the moment I add another data stream that my data depends on the resolver never actually resolves. If I directly return an…
Philipp Meissner
  • 5,273
  • 5
  • 34
  • 59
3
votes
2 answers

Angular resolver observable completes too early

I am passing a subject as an observable from a service to a resolver. The service may complete the observable when an http request completes or when it finds that the data it needs is cached. In the second case, where the data is cached it looks…
Sibi John
  • 475
  • 6
  • 22
3
votes
1 answer

Resolve function not getting executed in Resolver Angular 5

I'm in a big fix since this morning for a very silly reason. This should work but I don't understand whats stopping it. Anyways, code below My Resolver: export class UserResolver implements Resolve { constructor(private fakeApi:…
BigBadWolf
  • 133
  • 1
  • 3
  • 9
3
votes
1 answer

Router stop working after define Resolver with ngrx store injected

I'm using the router resolver in order to fetch my ngrx store data before the page is loaded. After inserting the resolver into my routes, the router is not generating the content I have in Other routes (without the…
Ron Rofe
  • 738
  • 1
  • 9
  • 25
3
votes
2 answers

can not resolve data with firestore

I have a firebase setup application and need to get all documents in a collection before the related component render. Data is coming through a normal subscription this.db.getCountryList().subscribe(countryList => this.countryList = countryList);…
2
votes
3 answers

How to conditionally update Angular route resolver data?

I've got an Angular route resolver that has a list of items that gets loaded when my parent route gets loaded, like /users. I have implemented an Angular resolver that looks more or less like this: export class UsersResolver implements…
hairbo
  • 3,113
  • 2
  • 27
  • 34
2
votes
1 answer

How resolvers work with SSR and Angular Universal

I am new to ssr and Angular universal and i have a question i didn't found an answer to. I wanted to know if it was possible, for pages with route resolve in Angular, to be rendered by the ssr server before the resolvers finish. In my case, I have…
2
votes
2 answers

Passing an object into Angular 9/10 resolver

I am stuck with passing object to the resolver in Angular 9/10. Any help will be deeply appreciated. I have a page SearchUser.component.ts from where I am navigating to another page UserInfo.component.ts. I am trying to pass the object in the…
Suzane
  • 193
  • 1
  • 3
  • 13
2
votes
0 answers

How to implement angular resolver using function?

I want to create a data resolver for my nav-bar. So using service I can't put it into my app-routing module because of nav-bar components not in the routing module. How to fix it? If it's duplicated, feel free to close this question, but I didn't…
2
votes
0 answers

Store/Restore partial form values on route change in Angular

How would you implement saving partially filled forms when navigating between routes? Eg. User starts filling a form, but decides to navigate to a different route and then go back to original the form. In usual case, when component is destroyed, all…
takeshin
  • 49,108
  • 32
  • 120
  • 164
2
votes
1 answer

Parent resolver is not called on child lazy loaded routes

I am trying to set side bar routes based on different user role privileges. The code for setting side bar routes is in site-resolver service. Which I have called in parent path which I think should be also called for its child routes. But instead,…
Hope
  • 475
  • 6
  • 16
2
votes
1 answer

How to do the filtering in a pipe of a resolver in Angular?

In my routes.ts I have { path: 'members', component: MemberListComponent, resolve: { users: MemberListResolver} },. I have the following piece of code in my component: users: User[]; constructor(private route: ActivatedRoute, private…
sdfsd
  • 1,043
  • 1
  • 8
  • 13
2
votes
1 answer

Resolver vs Redux

I have been working for quite some time now in small/medium sized projects with Angular and as long as there is some data which needs to be loaded from a server, the team directly goes for storing it into a Redux store. This allows for the data to…
AGoranov
  • 2,114
  • 3
  • 15
  • 27
2
votes
1 answer

make an angular global resolver to make data available in every route

I am trying to make a global resolver which will provide every route... Something like this this.activatedRoute.data => { global: {...} route: {...} } This is what i am trying const routes: Routes = [ { path: '', …
Omar
  • 2,726
  • 2
  • 32
  • 65
2
votes
0 answers

Angular routing: how to redirect to another path on resolve success?

I have an Angular app in which users can access using a direct link, containing a token, such as the following: localhost:3000/token/ The related component does a check for the token validity and if success then loads the page…
smartmouse
  • 13,912
  • 34
  • 100
  • 166
1
2
3
8 9