question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

runGuardsAndResolvers: 'paramsOrQueryParamsChange': resolve on query param change works but data does not seems to be passed to subscribed Observable.

See original GitHub issue

I’m submitting a …

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior When using runGuardsAndResolvers: 'paramsOrQueryParamsChange' to make sure that a resolver is run whenever a query parameter changes, the resolver does runs, but the fetched data is not passed onto the subscription to the route.data Observable within the component.

Expected behavior If I subscribe to route.data within the component, I would expect to get updates whenever new data is fetched, but I only get the initial data, no updates.

Please tell us about your environment: Ubuntu 16.04

  • Angular version: 2.0.X Angular 4.0.0-rc.5

  • Browser: Chrome 54

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Toxicablecommented, Mar 19, 2017

Can you reproduce in a plunkr please

0reactions
angular-automatic-lock-bot[bot]commented, Sep 11, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rxjs - Angular 11 Router data observable not updated when ...
The problem is, the subscription handler only gets called if the data actually changes, regardless of if the resolve method of the resolver...
Read more >
Explore Angular Router's runGuardsAndResolvers | juri.dev
When applying the pathParamsChange setting, the router will only re-run guards and resolvers when the path params change, thus ignoring optional ...
Read more >
Angular Router: Revealing some interesting facts and features
Firstly, with a non-wildcard route we can reuse the query params and the positional params (the params that follow the :nameOfParam model) ...
Read more >
Angular – How to rerun resolvers when queryParams change ...
I'm working on it for days, But doesn't find any solution so far. I've got a resolver service, which's supposed to return an...
Read more >
Angular: Refetch data on same URL navigation - Medium
In case the backend doesn't support a push technology we often use ... changed; paramsOrQueryParamsChange: fires only when a query param or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found