Probleme with app-route conprehension
mlabarre opened this issue · comments
Hello
I have just spent two days on the same problem which I think is due to a misunderstanding of app-route
. In my app page, I use the following "standard" directive
<app-route route="{{route}}"
pattern="/:page"
data="{{routeData}}"
tail="{{subroute}}">
</app-route>
I have a product page with
<app-route
route="[[route]]"
pattern="/:productName"
data="{{routeData}}">
</app-route>
I trap change for this page with an observer on routeData.productName
I have another page, a person page with
<app-route
route="[[route]]"
pattern="/:personId/:category"
data="{{routeData}}">
</app-route>
When I set the path (set route.path) to /product/apple
, I reach the good product page (apple fruit).
Next, when I set the path to /person/id1234/male
, I reach the page but I have an error in product page because I try to handle a productName id1234 !
Sorry I don't understand. I certainly have badly coded ! 👎
Thank you VERY much
Problem already submitted. Sorry