Hi
I am trying call a polymer page from router.go method of another polymer page.
It reaches the polymer element page and runs the core-ajax that i have defined there.
But after running the core-ajax part it never displays the page i.e. it never displays the content of the page.
page from which i m calling the page not getting loaded ...
///////////////////////////////////////////////////////
<polymer-element name="create-client" attributes="router" >
<template>
<app-router id="router" mode="auto|pushstate|hash">
<app-route path="/create-project/:clientName" import="/elements/create-project/create-project.html" on-before-data-binding="{{bindToken}}" bindRouter></app-route>
</app-router>
.
.
.
.<script>
(function() {
Polymer('create-client', {
createProject: function() {
this.$.router.bind('token', this.token, 10);
this.$.router.go('/create-project/' + this.savedClientName);
},
bindToken: function(event) {
debugger;
// update the route's model before it's bound to the home-page or login-page
event.detail.model.token = this.token;
}
}
//////////////////////////////////////////////////////////
Page where it goes and runs the core-ajax but does not reurn the page html.
////////////////////////////////////////////////////////////
<polymer-element name="create-project" attributes="clientName router" >
<template bind "{{clientName}}">
<app-router id="router" mode="auto|pushstate|hash">
<!-- <app-route path="/create-project/:clientName" import="/elements/create-project/create-project.html" on-before-data-binding="{{bindToken}}"></app-route> -->
</app-router>
.
.
.
<core-ajax
auto
url="{{globals.url}}listClients"
headers='{"Authorization": "{{token}}"}'
params=''
handleAs='json'
on-core-response="{{handleClientsResponse}}">
</core-ajax>
</template>
<script>
(function() {
Polymer('create-project', {
handleClientsResponse : function(e) {
this.listClients = e.detail.response;
console.log(e.detail.response);
}
I could debug and see that core-ajax is run , but my front end never displays the content of this page.
Can anyone let me know what's wrong here?