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.

$routeProvider.when() ignores inherited properties on route argument #8181

Closed
@cjerdonek

Description

@cjerdonek

The $routeProvider only seems to notice properties on the route parameter to $routeProvider.when(path, route) when those properties are own properties. It doesn't seem to pick up properties on the route object that are inherited properties (i.e. properties coming from prototypal inheritance).

I believe this is because the implementation of when() in the source code calls angular.extend() with the route as one of the sources, and angular.extend() only seems to copy own properties and not inherited properties of the sources.

If this limitation is deliberate, it should probably be in the documentation of the route parameter to when().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions