javascript - app.route not working in browser while working fine in mobile - Polymer1.0 -
i have polymer 1.0 app. in routing.html file have following configuration routes.
page('/applications', function () { app.route = 'applications'; }); page('/claims', function () { app.route = 'claims'; });
i have applied data-routes attr in index.html file map corresponding section part.
for ex:
<a data-route="claims" href="/claims"> <iron-icon icon="report-problem"></iron-icon> <span>claims</span> </a> <section data-route="claims"> <div class="vertical layout center"> <div> <p>getting claims...</p> <paper-progress value="10" secondary-progress="30" class="" indeterminate elavation="4"></paper-progress> </div> </div> </section>
so main problem occurs when try change routes through function. in case calling function on paper-fab tab event
i want change route when user click on paper fab, achieve defined method "createapplication" in app.js
app.createapplication = function() { app.route = 'create application'; };
and section part route in index.html file
<section data-route="create application"> <div class="vertical layout center fit"> <p> content</p> </div> </section>
the problem when click on paper -fab not changing route in browser same code runs fine in mobile.
Comments
Post a Comment