Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Global $httpProvider responseInterceptors can not depend on services which depend on $http #2367

@Zariel

Description

@Zariel

Currently if you register a responseInterceptor on $httpProvider you can not inject a service which depends itself on $http as you get a circular dependency loop due to $http being instantiated when $httpProvider is accessed.

I'm not sure if this is a bug within the DI itself or how $httpProvider handles responseInterceptor instantiation. The error thrown is

Uncaught Error: Circular dependency: service <- $http <- $compile 

Fiddle to show the problem:

http://jsfiddle.net/nkKpc/4/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions