我有类似于this的问题,除了我使用this的聚合物模板。Polymerfire - 无法读取未定义的属性'推'
我在声明<firebase-app>
的页面以及使用<firebase-query>
的页面中导入了所有聚合物引用参考文献。不工作。
我后来发现该模板使用了聚合火焰,其版本是v0.9.4而不是最新的v0.10.3。我试着卸载并重新安装新版本。没有改变。
有关更多的信息,这里的代码片段:
的src/APP-auth /中应用认证 - firebase.html
<link rel="import" href="../../bower_components/polymerfire/polymerfire.html">
<link rel="import" href="../../bower_components/polymerfire/firebase-app.html">
<link rel="import" href="../../bower_components/polymerfire/firebase-auth.html">
<link rel="import" href="../../bower_components/polymerfire/firebase-query.html">
...
<firebase-app name="pwa-demo" api-key="abc" auth-domain="abc" database-url="abc"></firebase-app>
<firebase-auth id="auth" app-name="pwa-demo" signed-in="{{_signedIn}}" user="{{_user}}"on-error="_onAuthError"></firebase-auth>
的src/APP-页/ APP-页新的东西/应用程序页面,新stuff.html
<link rel="import" href="../../../bower_components/polymerfire/firebase-auth.html">
<link rel="import" href="../../../bower_components/polymerfire/firebase-query.html">
<link rel="import" href="../../../bower_components/polymerfire/polymerfire.html">
...
<firebase-auth user="{{user}}"></firebase-auth>
<firebase-query id="stuffquery" app-name="pwa-demo" path="https://stackoverflow.com/users/[[user.uid]]/events" data="{{events}}"> </firebase-query>
...
_onFormSubmit: function() {
this.$.stuffquery.ref.push({
title: this.$.piTitle.value
});
}
还有什么我失踪?请帮忙。
编辑: 我发现了另外两个奇怪的东西,这可能会有帮助。首先,我无法同时检索数据和将数据从我的应用程序推送到应用程序。其次,当我试图在浏览器控制台中运行firebase.database()
时,我得到"Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app)."
有人吗?