I'm learning Polymer and i got some issues with app-route and app-location. I tried a simple example like this:
<dom-module id="test-component">
<template>
<style scoped>
</style>
<app-location route="{{route}}" use-hash-as-path></app-location>
<app-route route="{{route}}" pattern="/test/:advisor_id/:user_id"
data="{{data}}" tail="{{subroute}}">
</app-route>
route : [[route.path]]<br>
data.advisor_id : [[data.advisor_id]]<br>
data.user_id : [[data.user_id]]
</template>
<script>
Polymer({
is: "test-component",
properties: {
route: String,
data: Object
},
ready: function() {
console.log(this.route);
}
});
</script>
</dom-module>
The main page only loads components and have test-component tags on the body With the url localhost/test/advisor_id/14152, i see the component but data.advisor_id and data.user_id are empty. I tested route.path and it is empty too.
It seems like i forgot something but don't understand what it is.
Thanks in advance for your time