Skip to content

Commit 0e0815f

Browse files
committed
Merge pull request #138 from GoogleWebComponents/point-to-polymerfire
added pointers to new polymerfire component
2 parents 433081f + f4468dc commit 0e0815f

File tree

5 files changed

+40
-19
lines changed

5 files changed

+40
-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: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
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+
In this new component, the `firebase-collection` element has been replaced
19+
with [`firebase-query`](https://github.com/firebase/polymerfire#firebase-query)
20+
1521
An element wrapper for the Firebase API that provides a view into the provided
1622
Firebase location as an ordered collection.
1723
@@ -257,7 +263,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
257263

258264
if (!this.query) {
259265
this._fireQueryError('Query does not exist');
260-
return;
266+
return;
261267
}
262268

263269
query = this.query.ref().push();
@@ -336,7 +342,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
336342

337343
if (!this.query) {
338344
this._fireQueryError('Query does not exist');
339-
return;
345+
return;
340346
}
341347

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

400406
try {
401407
query = new Firebase(location);
402-
408+
403409
if (orderByMethodName) {
404410
if (orderByMethodName === 'orderByChild') {
405411
query = query[orderByMethodName](this.orderByChild);
@@ -429,13 +435,13 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
429435
}
430436

431437
} catch(e) {
432-
438+
433439
this._fireQueryError('Query cannot be instantiated with location ' + location + ' (' + e.toString() + ')');
434-
440+
435441
} finally {
436-
442+
437443
return query;
438-
444+
439445
}
440446

441447
},

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)