|
12 | 12 | <link rel="import" href="firebase-query-behavior.html"> |
13 | 13 |
|
14 | 14 | <!-- |
| 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 | +
|
15 | 21 | An element wrapper for the Firebase API that provides a view into the provided |
16 | 22 | Firebase location as an ordered collection. |
17 | 23 |
|
@@ -257,7 +263,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4> |
257 | 263 |
|
258 | 264 | if (!this.query) { |
259 | 265 | this._fireQueryError('Query does not exist'); |
260 | | - return; |
| 266 | + return; |
261 | 267 | } |
262 | 268 |
|
263 | 269 | query = this.query.ref().push(); |
@@ -336,7 +342,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4> |
336 | 342 |
|
337 | 343 | if (!this.query) { |
338 | 344 | this._fireQueryError('Query does not exist'); |
339 | | - return; |
| 345 | + return; |
340 | 346 | } |
341 | 347 |
|
342 | 348 | var key = change.path.split('.')[1]; |
@@ -399,7 +405,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4> |
399 | 405 |
|
400 | 406 | try { |
401 | 407 | query = new Firebase(location); |
402 | | - |
| 408 | + |
403 | 409 | if (orderByMethodName) { |
404 | 410 | if (orderByMethodName === 'orderByChild') { |
405 | 411 | query = query[orderByMethodName](this.orderByChild); |
@@ -429,13 +435,13 @@ <h4>[[dinosaur.__firebaseKey__]]</h4> |
429 | 435 | } |
430 | 436 |
|
431 | 437 | } catch(e) { |
432 | | - |
| 438 | + |
433 | 439 | this._fireQueryError('Query cannot be instantiated with location ' + location + ' (' + e.toString() + ')'); |
434 | | - |
| 440 | + |
435 | 441 | } finally { |
436 | | - |
| 442 | + |
437 | 443 | return query; |
438 | | - |
| 444 | + |
439 | 445 | } |
440 | 446 |
|
441 | 447 | }, |
|
0 commit comments