Skip to content

Angular: withDevtools option loadDevtools no longer supports dependency injection #8824

Open
@Eirmas

Description

@Eirmas

Describe the bug

Based on the documentation, you should be able to use inject within the loadDevtools option in the withDevtools function.
See https://github.com/TanStack/query/blob/main/docs/framework/angular/devtools.md

Now if you do this, you will get an NG0203 error.

Breaking PR: #8817

Your minimal, reproducible example

https://noop.com

Steps to reproduce

  1. Initialize angular with tanstack query
  2. Write a simple service with a boolean signal that will determine if the devtool is active
  3. Try injecting it in the "loadDevtools" option.

Expected behavior

As a developer I expected the devtools not to throw an NG0203 error

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Any browser

Tanstack Query adapter

angular-query

TanStack Query version

v5.68.1

TypeScript version

v5.8.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions