Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs/2-retrieving-data-as-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,16 @@ export class AppComponent {

Data is retrieved through the `af.database` service.

There are three ways to create an object binding:
There are two ways to create an object binding:

1. Relative URL
2. Absolute URL
3. Reference
1. Absolute URL

```ts
// relative URL, uses the database url provided in bootstrap
const relative = af.database.object('/item');
// absolute URL
const absolute = af.database.object('https://<your-app>.firebaseio.com/item');
// database reference
const dbRef = new Firebase('https://<your-app>.firebaseio.com/item');
const relative = af.database.object(dbRef);
```

### Retrieve data
Expand Down
16 changes: 8 additions & 8 deletions docs/3-retrieving-data-as-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ Data is retrieved through the `af.database` service.
There are four ways to create an object binding:

1. Relative URL
2. Absolute URL
3. Reference
4. Query
1. Absolute URL
1. Query

```ts
// relative URL, uses the database url provided in bootstrap
const relative = af.database.list('/items');
// absolute URL
const absolute = af.database.list('https://<your-app>.firebaseio.com/items');
// database reference
const dbRef = new Firebase('https://<your-app>.firebaseio.com/items');
const relative = af.database.list(dbRef);
// query
const dbQuery = new Firebase('https://<your-app>.firebaseio.com/items').limitToLast(10);
const queryList = af.database.list(dbQuery);
const queryList = af.database.list('/items', {
query: {
limitToLast: 10,
orderByKey: true
}
});
```

### Retrieve data
Expand Down