Skip to content

Commit 79742cc

Browse files
author
Taylor Savage
committed
added pointers to new polymerfire component
1 parent 0b1f9b9 commit 79742cc

File tree

5 files changed

+38
-19
lines changed

5 files changed

+38
-19
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
firebase-element
1+
## Note: This element is for the older Firebase 2.0 API.
2+
For the latest official Firebase 3.0-compatible component from the Firebase team,
3+
see the [polymerfire](https://github.com/firebase/polymerfire) component.
4+
25
================
36

47
See the [component page](https://elements.polymer-project.org/elements/firebase-element?active=firebase-collection) for more information.

firebase-auth.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<link rel="import" href="../polymer/polymer.html">
1212

1313
<!--
14+
**Note: This element is for the older Firebase 2 API**
15+
For the latest official Firebase 3.0-compatible component from the Firebase team,
16+
see the [polymerfire](https://github.com/firebase/polymerfire) component.
17+
1418
Element wrapper for the Firebase authentication API (https://www.firebase.com/docs/web/guide/user-auth.html).
1519
1620
@demo demo/index.html

firebase-collection.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<link rel="import" href="firebase-query-behavior.html">
1313

1414
<!--
15+
**Note: This element is for the older Firebase 2 API**
16+
For the latest official Firebase 3.0-compatible component from the Firebase team,
17+
see the [polymerfire](https://github.com/firebase/polymerfire) component.
18+
1519
An element wrapper for the Firebase API that provides a view into the provided
1620
Firebase location as an ordered collection.
1721
@@ -257,7 +261,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
257261

258262
if (!this.query) {
259263
this._fireQueryError('Query does not exist');
260-
return;
264+
return;
261265
}
262266

263267
query = this.query.ref().push();
@@ -336,7 +340,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
336340

337341
if (!this.query) {
338342
this._fireQueryError('Query does not exist');
339-
return;
343+
return;
340344
}
341345

342346
var key = change.path.split('.')[1];
@@ -399,7 +403,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
399403

400404
try {
401405
query = new Firebase(location);
402-
406+
403407
if (orderByMethodName) {
404408
if (orderByMethodName === 'orderByChild') {
405409
query = query[orderByMethodName](this.orderByChild);
@@ -429,13 +433,13 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
429433
}
430434

431435
} catch(e) {
432-
436+
433437
this._fireQueryError('Query cannot be instantiated with location ' + location + ' (' + e.toString() + ')');
434-
438+
435439
} finally {
436-
440+
437441
return query;
438-
442+
439443
}
440444

441445
},

firebase-document.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<link rel="import" href="firebase-query-behavior.html">
1414

1515
<!--
16+
**Note: This element is for the older Firebase 2 API**
17+
For the latest official Firebase 3.0-compatible component from the Firebase team,
18+
see the [polymerfire](https://github.com/firebase/polymerfire) component.
19+
1620
An element wrapper for the Firebase API.
1721
1822
A `<firebase-document>` is a reference to a remote document somewhere on
@@ -92,11 +96,11 @@
9296
}
9397
var query;
9498
try {
95-
99+
96100
query = new Firebase(location);
97-
101+
98102
} catch(e) {
99-
103+
100104
this._fireQueryError('Query cannot be instantiated with location ' + location + ' (' + e.toString() + ')');
101105

102106
} finally {
@@ -106,40 +110,40 @@
106110

107111
_updateRemoteDocument: function() {
108112
this._log('Updating remote document');
109-
113+
110114
if (!this.query) {
111115

112116
this._fireQueryError('Query does not exist');
113-
return;
117+
return;
114118

115119
}
116120

117121
this.query.update(this.dataAsObject);
118-
122+
119123
},
120124

121125
_setRemoteDocumentChild: function(key, value) {
122126
if (!this.query) {
123127

124128
this._fireQueryError('Query does not exist');
125-
return;
129+
return;
126130

127131
}
128132

129133
this.debounce('set-' + key, function() {
130134
this._log('Setting child "' + key + '" to', value);
131135
this.query.child(key).set(value);
132136
});
133-
137+
134138
},
135139

136140
_removeRemoteDocumentChild: function(key) {
137141
this._log('Removing child "' + key + '"');
138-
142+
139143
if (!this.query) {
140144

141145
this._fireQueryError('Query does not exist');
142-
return;
146+
return;
143147

144148
}
145149

firebase-query-behavior.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
<link rel="import" href="firebase.html">
1313

1414
<script>
15-
/** @polymerBehavior */
15+
/** @polymerBehavior
16+
**Note: This element is for the older Firebase 2 API**
17+
For the latest official Firebase 3.0-compatible component from the Firebase team,
18+
see the [polymerfire](https://github.com/firebase/polymerfire) component.
19+
*/
1620
Polymer.FirebaseQueryBehavior = {
1721
properties: {
1822
/**

0 commit comments

Comments
 (0)