Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Components state is not visible if Router is injected in component #1283

Closed
Hojou opened this issue Apr 6, 2018 · 9 comments
Closed

Components state is not visible if Router is injected in component #1283

Hojou opened this issue Apr 6, 2018 · 9 comments
Assignees
Labels

Comments

@Hojou
Copy link

Hojou commented Apr 6, 2018

Augury: 1.15.5
Date: Fri, 06 Apr 2018 09:46:59 GMT
OS: Win32

Angular version (required): 5.0.1

Steps to reproduce:

  1. Create an app with a component that has a service as a dependency. Observe the components state and modify the service properties, events etc.
  2. Add Router as a dependency to the component. The components State is disabled in the Augury plugin. You can no longer inspect the service from previous step

Additional details:
Whenever a component is dependant on Router or on another service that has a dependency to Router, the State tab is disabled for that component in Augury.
I know this is an old bug from a previous version of Augury and previous version of Angular:#699

With Router injected:
image
Without Router injected:
image

@Hojou Hojou changed the title State is not visible if Router is injected Components state is not visible if Router is injected in component Apr 6, 2018
@santiago-elustondo
Copy link
Contributor

Thanks. Will investigate.

@santiago-elustondo santiago-elustondo self-assigned this Apr 23, 2018
@nstohler
Copy link

Same problem for me if when I inject HttpClient:

constructor(private http: HttpClient) {}

@santiago-elustondo
Copy link
Contributor

The router injection issue is confirmed. I see the state disappearing when Router is injected.
However, It works fine for me when I inject HttpClient.
@nstohler, are you injecting anything else into that component?

@santiago-elustondo
Copy link
Contributor

Can you try the latest Canary Build, and tell me if the issue persists there?

@nstohler
Copy link

@santiago-elustondo I've set up a new Angular CLI v6 project, and as soon as I inject any service (HttpClient or even an empty service I've created with ng g s empty), I get no more component state.

With the Canary Build, it all works.

@santiago-elustondo
Copy link
Contributor

Version 1.16.2 released, which brings the official FireFox and Chrome versions up-to-date with the Canary Build.

@santiago-elustondo
Copy link
Contributor

Please reopen if the issue persists.

@tinyweasel
Copy link

Still happening me on 1.21.0

@andria-dev
Copy link

@santiago-elustondo or @Hojou can someone reopen this. I'm still having this issue on v1.22.0. Also, if someone could git bisect to find where the issue was reintroduced that might help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants