google-cliend-loader 忽略 apiRoot 和 appId

google-cliend-loader ignores apiRoot and appId

我正在尝试在我的聚合物应用程序 API 中使用 Google Cloud Endpoints。 我已将我的 API 加载到 Google App Engine 中,并且可以通过资源管理器对其进行探索 - 这里一切正常。

同样 - 我可以通过 google-cliend-loader:

使用其他标准 Google API(比如 plus)
<google-client-loader id="plus" name="plus" version="v1"
  on-google-api-load="plusLoaded">
</google-client-loader>

一切正常。

但是 - 然后我尝试使用我的 API:

<google-client-loader appId="my-application-id" name="myApi" version="v1"
  on-google-api-load="backendLoaded">
</google-client-loader>

我仍然在控制台中看到:

https://content.googleapis.com/discovery/v1/apis/myApi/v1/rest?fields=kind%…%2Cversion%2CrootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods&pp=0 404 ()

所以 - 看起来它正试图从 Google 获取 API - 而不是从我的应用程序。

我这边有什么遗漏吗?是否有任何使用和端点的工作示例?

来自 property binding 上的 Polymer 文档:

To bind to camel-case properties of elements, use dash-case in the attribute name. For example:

<user-view first-name="{{managerName}}"></user-view>
<!-- Sets <user-view>.firstName = this.managerName; -->

要以声明方式设置 appId 属性,您可以使用:

<google-client-loader app-id="my-application-id" ...>