Skip to main content

All Questions

0 votes
1 answer
36 views

Unwanted AutoUpdate Takes me to Another Rote

I have a component watchlist component that is supposed to call a method from another component search-home-component when a click event occurs. here is my watchlist component: <p>watchlist ...
Negar's user avatar
  • 1
1 vote
0 answers
91 views

Aliasing a service lazy loaded from a module

If I define a Route in my AppModule to alias a provider that is included in the module, like so: { path: "my-path", loadComponent: () => import('./my-component'), providers: [ { ...
Trevortni's user avatar
  • 738
8 votes
3 answers
37k views

Angular:: error TS2532: Object is possibly 'undefined'

I was doing the angular Tour-hero project(replaced Hero with 'User'). There when I made the Hero(User) and Hero-detail(User-detail) separate and when I tried to access the details, it is not showing ...
Ousi Boi's user avatar
2 votes
1 answer
3k views

Data from api is diplayed only after refreshing the pages in angular

I'm new to angular and I was working on an angular project. There is a problem I'm facing is that, after each component routing the data from is not displayed at first but after reloading the page the ...
james's user avatar
  • 175
1 vote
2 answers
450 views

Best way to pass data retrivied from API between routes

So I am wondering what is the best way to pass data retrivied from an API endpoint to another component without requesting data again? So from what I can understand I can do this with a Service shared ...
Marco Ripamonti's user avatar
1 vote
0 answers
1k views

Angular 9: resolver and service on the same component

I have a service from which I get the list of the students from my backend with this simple function students-service.ts getStudents(): Observable<Student[]> { return this.httpClient.get&...
dcfg's user avatar
  • 891
0 votes
1 answer
563 views

How to access the value stored in variable of angular service from another component

I want to share the question details along with option array from one component to another using services. How do i need to store the value & get that value from the service my question-service ...
Vinay SPal's user avatar
0 votes
2 answers
3k views

Angular use service in lazy loaded module

I have a service called routing.service which subscribes to routing event and when a parameter changes, it updates Translate service. As following in constructor: this.router.events.subscribe(val =&...
Vahid Najafi's user avatar
  • 5,133
0 votes
1 answer
443 views

Return resolved Data from Pipe Angular 4 using Behavior Subject

My service is: DetailService.ts Send Detail() sendDetail(id: number) { console.log("Snd trandetail"); const url = this.rootUrl + 'api/Details/Select?ID=' + id; this.http.get(url).pipe( ...
Ingila Ejaz's user avatar
1 vote
1 answer
3k views

Angular 5: Authentication guard automatically navigates to specified component

I have set an authentication guard with firebase email and password login, the issue is that it automatically triggers the route to the specified component. I have implemented the authentication ...
RxDev's user avatar
  • 295
2 votes
1 answer
665 views

Angular - Dynamic header

I have a website currently under development. Issue: When accessing a page, the front page is briefly displayed - and then the current page is shown. Please try refreshing this link to have better ...
shobhit vaish's user avatar
0 votes
1 answer
178 views

Angular 2+ resolve route data

I want to return data from API in angular route resolver but if there is any error in API data due to stale token I would refresh the token again and hit the same API.Below is the code for it import ...
jalak vora's user avatar
2 votes
2 answers
1k views

How to use route parameter as argument for a service method?

I'm trying to get product details to the route of single product. for now I have route for single product with id parameter and it's working fine { path: 'single-product/:id', component: ...
Yahya Essam's user avatar
  • 1,902
-2 votes
2 answers
2k views

Disable router navigate link based on conditions

How can I disable the router.navigate or the link, based on a status? If the status is a "No" then i can't type the link to edit the Materials? HTML <button type="button" (click)="...
Joseph's user avatar
  • 7,735
-1 votes
1 answer
53 views

why is the http service being called automatically

From the Http service the data is fetched and then is passed into cached service the compoenent subcribes to cached service and makes the http request when initiated. the http get service is ...
SONGSTER's user avatar
  • 605

15 30 50 per page