145 questions
2
votes
2
answers
149
views
How to use an Angular Route Title Resolver to wait on an observable?
I have an Angular 19 app and I am trying to add a route title resolver that gets the page title by looking up some data in the results of an Observable.
The issue is that when the app first loads, the ...
1
vote
0
answers
49
views
"At least one route resolver didn't emit any value" Navigation error on parent route resolver (Angular)
I have an inconsistent navigation issue when authenticating on my website. On authentication from the login page, there is a navigation to the home page (auth only).
On occasion, the navigation fail, ...
1
vote
0
answers
138
views
Angular: Guard after resolved data
I'm having a route /invoices/:invoiceId for an invoice detail view which needs to be protected with 2 conditions
User needs to be authenticated --> Redirect to login page
Invoice with given id ...
0
votes
0
answers
68
views
How to apply declarative RXJS in Angular for route resolvers
I'm interested in adapting the following code for route resolvers.
private categorySubject = new Subject<number>();
categorySelectedAction$ = this.categorySubject.asObservable();
...
2
votes
1
answer
447
views
How to handle stored query params in angular route using resolvers to avoid any extra navigation?
I have this scenario: I am saving the query params in a service in order to keep alive this data if the user close the browser, using the resolvers I am using the result from the active route to add ...
0
votes
2
answers
301
views
Can a resolver use the same service instance form another module except the AppModule in Angular?
I have a lazy loaded module with all it components declared and routes added in RouterModule.forChild()
but some of these routes have their resolver that will prefetch some data And call a service to ...
1
vote
2
answers
1k
views
How do I run a http request using a functional resolver?
In the past I can use a class based resolver where I can inject HttpClient in the constructor, but that's been deprecated Source.
I'd like to make an HTTP get request in a functional resolver. How do ...
0
votes
0
answers
2k
views
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 = '...
14
votes
1
answer
18k
views
i get resolve as strikethrough in my angular 15 generated project. how can i solve this?
I'm really new to angular and this is the first project I'm creating. what I need to do here is create an add-editClient component and use the angular resolve method to get data from the backend which ...
2
votes
1
answer
1k
views
"Unable to resolve dependency tree" while creating a new Angular project
I am new to coding, and I want to start using Angular on my M1 MacBook.
The installation of Angular cli was only somewhat successful, as I got this warning after typing sudo npm install -g @angular/...
1
vote
1
answer
554
views
Angular Router not Resolving Promises before returning observable
I have a resolver which uses the url to fetch the parent called a bubble, for the reply that I then want to fetch based on the URL.
Problem is that my findReplyByUrl() function wont wait for the DOCID ...
0
votes
0
answers
95
views
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. ...
-1
votes
1
answer
702
views
How to use forkJoin and mergeMap in Angular resolver to chain HTTP requests?
I am building a resolver that is used when my app loads initially. I need to run several HTTP requests, which can be run at the same time (hence using forkJoin). But there are a few that need to be ...
1
vote
0
answers
762
views
Angular 12: Resolve guard redirects to its current component instead of navigating to its destination
When you log in you should be redirected to the dashboard page. When we navigate to the dashboard we are going to do a resolve so that the data is already loaded even before we can see the page. When ...
0
votes
1
answer
425
views
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 ...
0
votes
0
answers
139
views
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<...
0
votes
2
answers
3k
views
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 ...
1
vote
1
answer
325
views
Angular: routing resolver placement
Does it matter where the resolver exists in Angular in these two examples? Both of these two snippets of code achieve the same result:
Placing the resolver at the module-level within AppModule:
const ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
116
views
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 wrong?
...
-1
votes
2
answers
601
views
how can i pass queryparams to my resolver
here is my ngOnInit in my component -
ngOnInit() {
this.route.queryParams.subscribe(
(params) => {
console.log(params);
}
)
}
here is my resolver -
class ...
0
votes
2
answers
826
views
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 ...
0
votes
1
answer
2k
views
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 } ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
2k
views
Angular Resolver not working no provider for ()
I have this issue in a new project.
I have created a route:
const routes: Routes = [
{
path: '',
component: CategoriesComponent,
},
{
path: ':categoryId',
...