Skip to content

[devtools] duplicate entries in Components > Injected Services #57544

@P4

Description

@P4

Is this a bug report or a feature request?

  • Bug Report
  • Feature Request

Please provide the steps to reproduce the issue [Bug Report only]

  1. Create an example application:
import { Component, output } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';

@Component({
  selector: 'app-root',
  standalone: true,
  template: `Test`,
})
export class AppComponent {
  foo = output();
  bar = output();
  baz = output();
}

bootstrapApplication(AppComponent, {providers: []})
  .catch((err) => console.error(err));
  1. run ng serve, open the application in the browser
  2. open the Angular DevTools, select app-root in the Components tab

Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]

If the same token was injected more than once, the Injected Services section shows duplicate entries, one for each injection.

This results in a lot of repetition, especially when using the new framework features such as output, toSignal, effect, etc. which inject multiple dependencies internally.

The info shown for multiple injections is exactly the same and doesn't provide additional information, apart from maybe the Optional flag being different for some of them

Please provide a screenshot if possible [Bug Report only]

Injected Services for app-root, with entries for ErrorHandler (Optional) and DestroyRef listed 3 times, once for each output

Please provide the exception or error you saw [Bug Report only]

No response

Is this a browser-specific issue? If so, please specify the device, browser, and version. [Bug Report only]

No response

Description [Feature Request only]

No response

Proposed solution [Feature Request only]

No response

Alternatives considered [Feature Request only]

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions