Skip to content

location subscribe returns an object instead of "real" interface #13378

Closed

Description

@lilling

I'm submitting a ... (check one with "x")
[X] feature request

Current behavior
the location.subscribe onNext() method gets 'any'.
image

Expected behavior
But the location.subscribe sends a popState object that described in https://github.com/angular/angular/blob/2.3.0/modules/@angular/common/src/location/location.ts#L60-L63
image

Steps to reproduce
Just call Loaction.subscribe and the callback you get is an Object instead of real ts class.

What is the motivation / use case for changing the behavior?
When I'm subscribing to it. I would like

Please tell us about your environment:
windows 10 vsCode

  • Angular version: 2.0.0

  • Browser: [all]

  • Language: [all ]

Activity

  1. DzmitryShylovich commented on Dec 11, 2016

    @DzmitryShylovich
    Contributor

    Pls provide:

    1. small repro in plunkr.
    2. steps to reproduce
    3. expected behaviour
  2. added
    area: commonIssues related to APIs in the @angular/common package
    needs reproductionThis issue needs a reproduction in order for the team to investigate further
    on Dec 12, 2016
  3. DzmitryShylovich commented on Dec 12, 2016

    @DzmitryShylovich
    Contributor

    instead of real ts class

    why would you want it to be a class? Or you just want in interface instead of any so u will get an auto-completion in ide?

  4. vicb commented on Dec 12, 2016

    @vicb
    Contributor

    The object has the same prototype as the instance of the class. This is valid.

  5. added 4 commits that reference this issue on Jan 31, 2017
    fe44118
    5651766
    71567d1
  6. added a commit that references this issue on Aug 11, 2017
    84285f0
  7. added a commit that references this issue on Aug 28, 2017
    9d8f16b
  8. angular-automatic-lock-bot commented on Sep 10, 2019

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: commonIssues related to APIs in the @angular/common packageneeds reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions