Questions tagged [angular-resolver]

135 questions
0
votes
1 answer

Get loaded component in parent resolver

I'm trying to access the component's name in parent resolver, but it is always undefined. It might be a limitation of the angular router, a not implemented feature, or an intentional behaviour, because at that point the component is not…
gr4viton
  • 1,434
  • 1
  • 8
  • 21
0
votes
1 answer

Issue Loading Dynamic Templates into Text Editor (TinyMCE) via Angular Resolver

I am attempting to inject dynamic templates into my tinyMCE configuration prior to loading the element. The reason for this is because I want my users to save templates on their own and be able to utilize the templates whenever they access the…
lildakota
  • 141
  • 3
  • 15
0
votes
1 answer

Angular - How to share a service provided in component with the component's resolver?

I have a messenger component, with a messages service provided in the component itself (as it needs to be component specific) as such: @Component({ selector: "app-messenger", templateUrl: "./messenger.page.html", styleUrls:…
arcrub
  • 170
  • 1
  • 11
0
votes
0 answers

HttpClient request in loop Angular Resolver

I have my resolver.ts return this.wardrobeStateServ.init(this.categoryIndexes).pipe(take(1), map((value) => value)); and my init function init(categoryIndexes: number[]): Observable { if (this.firstSubWardrobeSubject.value ===…
0
votes
3 answers

Angular 12 + Ionic 5: Resolver does not wait for the Storage and HTTP calls to finish

SITUATION: This question is regarding a SPA that I am building using Angular 12 and Ionic 5. When I am on the Home page, I can click the "Order History" link in the Side Menu and this routes me to the Order History page. I am using a Resolver in…
Devner
  • 6,825
  • 11
  • 63
  • 104
0
votes
2 answers

Angular resolver inject router

I defined a resolver in my Angular (v13) app to do some shenanigans with a wordpress backend. When the user accesses an URL I want the resolver to check post type and ID from wordpress and route accordingly (post list, single post, page, ...). To do…
0
votes
0 answers

Call API/Resolve page before Refresh in Angular

when I refresh page(f5) for a moment footer is just coming to top, then page is loaded. I am using resolver for load data from api. When I route from another component everything works as expected, data is loaded before. How to load data from API…
korallo
  • 87
  • 2
  • 8
0
votes
1 answer

Angular - Get data from a particular component instance in order to be able to interact with it via a button click

I have a status box which is it’s own component. On my app there are multiple instances of this status box component as you can see from the image below: The details of each status box are stored in the browsers local storage and are created when a…
0
votes
1 answer

Angular 6+ resolver doesn't load video url

I am trying to load a video url after the data be loaded from the server. I am using a resolver but it doesn't work because the video is loaded before the data some times. What I am doing…
beanic
  • 539
  • 6
  • 22
0
votes
2 answers

Is there a way that I can conditionally return an HTTP response?

I'm using a resolver to get information to populate my website. And I want to test the connection to the API to get the information so that if I don't get a response, I can call a local set of mocked data to ensure that the HTML works. This is the…
0
votes
0 answers

How do you reload the current route with route resolvers in Angular 11

How do you reload the current route (with route resolvers) in Angular 11 without using window.href or navigateByUrl? I just want to re-run the route resolvers.
0
votes
1 answer

Angular Route Param not resolving

Angular is not resolving my route parameter and I don't understand why.... GAH. This is my routes file for the lazy module; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import {…
Ed Stephenson
  • 704
  • 1
  • 8
  • 31
0
votes
1 answer

Getting ResolverFactory injection issue when injecting resolver

Consider myself as a newbie. I have created my own Resolver class and trying to inject it in my feature module. But it is throwing me following error: core.js:4352 ERROR Error: Uncaught (in promise): NullInjectorError:…
0
votes
1 answer

Correct way to Fetch/Pass values in a Resolver | Angular 10/11

So, I'm trying to get this data into a component before it begins to load so I can set some things before the view loads. But I'm confused as to how this resolver works, what it returns and how to read it. I don't get the right data types and I'm…
Someguy
  • 414
  • 3
  • 16
0
votes
1 answer

Resolver is not returning Data in Angular

I am new in Angular. I am trying to use resolver in my code. I have define routes for using resolver. Here is my routing. { path: '', component: AppComponent, resolve: { post: ResolverService } } Then I create a resolver…
Rajib
  • 41
  • 4
1 2 3
8 9