app-location删除查询字符串参数
问题描述:
我有一个非常简单的聚合物2应用程序,它使用查询查询字符串参数。移动到聚合物2.0.1和应用程序位置2.0(而不是RC和预览版本),我注意到,只是有一个应用程序位置元素从URL中删除所有查询字符串参数。app-location删除查询字符串参数
试试这个网址:https://api-1913.s3-eu-west-1.amazonaws.com/index.html?foo=bar,并注意如何在加载过程中删除查询字符串。
这里的所有代码: 的index.html:
<!DOCTYPE HTML>
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="/my-app.html">
<html>
<head>
</head>
<body>
<my-app></my-app>
</body>
</html>
我-app.html:
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="/bower_components/app-route/app-location.html">
<dom-module id="my-app">
<template>
<app-location></app-location>
<h1>Coin</h1>
</template>
<script>
class App extends Polymer.Element{
static get is(){return 'my-app'}
ready(){
super.ready()
console.log('ready')
}
}
customElements.define(App.is, App)
</script>
</dom-module>
指定query-params
属性,它映射到App
属性不会改变任何东西。删除app-location
元素并保留查询字符串。
有没有人看到这种行为?是否有任何解决方法 - 除了回退到以前的版本?
答
这是一个错误。您可以临时删除iron-location元素中的默认值,直到修复被释放。
行删除
value: function() {
return {};
}
受损财产
paramsObject: {
type: Object,
notify: true,
value: function() {
return {};
}
},