Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Polymer 聚合物起动器套件布线问题_Polymer_Web Component - Fatal编程技术网

Polymer 聚合物起动器套件布线问题

Polymer 聚合物起动器套件布线问题,polymer,web-component,Polymer,Web Component,我正在使用polymer starter kit代码,并获得带有主页、联系人和用户菜单的GUI。我正在eclipse中使用Java动态Web项目。因此,基本url是: localhost:8080/TestProject/ 当我单击“联系人”或“用户”菜单后单击“主页”时,它会将url更改为: localhost:8080 我已尝试将app.js文件中的默认基本url设置为: app.baseUrl='/TestProject/' 但行为还是一样的 如果在routing.html中,

我正在使用polymer starter kit代码,并获得带有主页、联系人和用户菜单的GUI。我正在eclipse中使用Java动态Web项目。因此,基本url是:

  • localhost:8080/TestProject/

    当我单击“联系人”或“用户”菜单后单击“主页”时,它会将url更改为:
  • localhost:8080
我已尝试将app.js文件中的默认基本url设置为:

  • app.baseUrl='/TestProject/'
    

    但行为还是一样的
如果在routing.html中,我会进行如下更改: -

没有什么变化。但是如果我在index.html中更改:

<paper-menu class="app-menu" attr-for-selected="data-route" selected="[[route]]">
      <a data-route="home" href="{{baseUrl}}TestProject">
        <iron-icon icon="home"></iron-icon>
        <span>Home</span>
      </a>
但它应该是:

http://localhost:8080/TestProject/

伙计们,我哪里做错了。或者我应该在哪里进行更改以实现主url。

非常感谢。

较新版本的PSK在
router.html
中有以下部分:

// Removes end / from app.baseUrl which page.base requires for production
if (window.location.port === '') {  // if production
  page.base(app.baseUrl.replace(/\/$/, ''));
}

page('/',updateRedux, function() {
  page.redirect('/start');
});

page(app.baseUrl,updateRedux, function() {
  page.redirect('/start');
});

尝试删除主路径开头的
/
http://localhost:8080/TestProject/
http://localhost:8080/TestProject/#!/home
// Removes end / from app.baseUrl which page.base requires for production
if (window.location.port === '') {  // if production
  page.base(app.baseUrl.replace(/\/$/, ''));
}

page('/',updateRedux, function() {
  page.redirect('/start');
});

page(app.baseUrl,updateRedux, function() {
  page.redirect('/start');
});