javascript - Routing doesn't work when in for-loop -
    i building website using polymer  (>= 1.2.0) based on psk (polymer starter kit) .   i running (probably noob) problem attempting centralize and/or automatize router configurations.   i have appended following code end of psk's app.js  file:   //note: app.baseurl set psk's original code earlier in file: app.baseurl = '/'; app.routemap = [   {name: "home", text: "home", icon: "home", url: app.baseurl},   {name: "about", text: "about", icon: "face", url: app.baseurl + "about"},   {name: "portfolio", text: "portfolio", icon: "build", url: app.baseurl + "portfolio"},   {name: "contact", text: "contact", icon: "mail", url: app.baseurl + "contact"} ];   i replaced original routing-configuration code in routing.html  new version, uses routemap :   page('*', scrolltotop, closedrawer, function (ctx, next) {   next(); ...