Polymer 1.x + Firebase == 你好,世界?
Polymer 1.x + Firebase == Hello world?
我想用 Polymer firebase-collection
元素制作 Hello, world。
我希望看到一次或多次重复 Hello, world
并且控制台中没有错误。相反,我看不到 Hello, world
和许多以以下内容开头的控制台错误:
console.log
ReferenceError: Firebase is not defined
要重现问题,请执行以下步骤:
- Open this jsBin.
- ❌ 观察控制台中没有 Hello, world 和错误。
注意 <firebase-collection>
代码只是 copy/paste from the official documentation located here.
http://jsbin.com/guzimubuma/edit?html,控制台,输出
<!doctype html>
<head>
<meta charset="utf-8">
<!---- >
<base href="https://polygit.org/components/">
<!---- >
Toggle below/above as backup when server is down
<!---->
<base href="https://polygit2.appspot.com/components/">
<!---->
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>
<link href="polymer/polymer.html" rel="import">
<link href="firebase-element/firebase-collection.html" rel="import">
<link href="paper-button/paper-button.html" rel="import">
</head>
<body>
<dom-module id="x-element">
<template>
<style></style>
<p>
<paper-button on-tap="_handleClick">Click Me</paper-button>
</p>
<!---->
<firebase-collection
location="https://dinosaur-facts.firebaseio.com/dinosaurs"
data="{{dinosaurs}}"></firebase-collection>
<template is="dom-repeat" items="[[dinosaurs]]" as="dinosaur">
Hello, world
</template>
<!---->
Hello, world
</template>
<script>
(function(){
Polymer({
is: "x-element",
_handleClick: function() {
console.log('You clicked me!');
}
});
})();
</script>
</dom-module>
<x-element></x-element>
</body>
评论摘要。
此问题是由服务器问题 (at polygit2.appspot.com) 造成的,现已解决。
我想用 Polymer firebase-collection
元素制作 Hello, world。
我希望看到一次或多次重复 Hello, world
并且控制台中没有错误。相反,我看不到 Hello, world
和许多以以下内容开头的控制台错误:
ReferenceError: Firebase is not defined
要重现问题,请执行以下步骤:
- Open this jsBin.
- ❌ 观察控制台中没有 Hello, world 和错误。
注意 <firebase-collection>
代码只是 copy/paste from the official documentation located here.
<!doctype html>
<head>
<meta charset="utf-8">
<!---- >
<base href="https://polygit.org/components/">
<!---- >
Toggle below/above as backup when server is down
<!---->
<base href="https://polygit2.appspot.com/components/">
<!---->
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>
<link href="polymer/polymer.html" rel="import">
<link href="firebase-element/firebase-collection.html" rel="import">
<link href="paper-button/paper-button.html" rel="import">
</head>
<body>
<dom-module id="x-element">
<template>
<style></style>
<p>
<paper-button on-tap="_handleClick">Click Me</paper-button>
</p>
<!---->
<firebase-collection
location="https://dinosaur-facts.firebaseio.com/dinosaurs"
data="{{dinosaurs}}"></firebase-collection>
<template is="dom-repeat" items="[[dinosaurs]]" as="dinosaur">
Hello, world
</template>
<!---->
Hello, world
</template>
<script>
(function(){
Polymer({
is: "x-element",
_handleClick: function() {
console.log('You clicked me!');
}
});
})();
</script>
</dom-module>
<x-element></x-element>
</body>
评论摘要。
此问题是由服务器问题 (at polygit2.appspot.com) 造成的,现已解决。