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

Property "data" doesn't change when the route isn't active #206

@alber70g

Description

@alber70g

Description

app-route.data isn't changed when the route is not active according to the pattern. This results in false positives when only looking at the app-route.data.

Example

    <!-- /523 -->
    <app-route route="{{route}}"
      pattern="/:id"
      data="{{productData}}"
      active="{{idRouteActive}}">
    </app-route>

    <!-- /523/open -->
    <app-route route="{{route}}"
      pattern="/:id/:action"
      data="{{actionData}}"
      active="{{idActionActive}}">
    </app-route>

Let's say we have this route, we can add an observer _observeRoutes(productData, actionData). Then check for both of the id's, where we assume that only one can be filled.

This assumption is false: the not-active route will not have an updated app-route.data, resulting in the false positive of app-route.data.id.

Live Demo

Steps to reproduce

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

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