Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 859e73b

Browse files
author
Jacob Wenger
authored
Fixed incorrect code samples in guides (#796)
1 parent 91b434c commit 859e73b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/guide/beyond-angularfire.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This is easiest to accomplish with an example, so read the comments carefully.
2323
```js
2424
app.controller("SampleCtrl", ["$scope", "$timeout", function($scope, $timeout) {
2525
// create a reference to our Firebase database
26-
var ref = firebase.database.ref();
26+
var ref = firebase.database().ref();
2727

2828
// read data from the database into a local scope variable
2929
ref.on("value", function(snapshot) {

docs/guide/synchronized-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var app = angular.module("sampleApp", ["firebase"]);
3636
// inject $firebaseObject into our controller
3737
app.controller("ProfileCtrl", ["$scope", "$firebaseObject",
3838
function($scope, $firebaseObject) {
39-
var ref = firebase.database.ref();
39+
var ref = firebase.database().ref();
4040
// download physicsmarie's profile data into a local object
4141
// all server changes are applied in realtime
4242
$scope.profile = $firebaseObject(ref.child('profiles').child('physicsmarie'));
@@ -98,7 +98,7 @@ app.factory("Profile", ["$firebaseObject",
9898
return function(username) {
9999
// create a reference to the database node where we will store our data
100100
var randomRoomId = Math.round(Math.random() * 100000000);
101-
var ref = firebase.database.ref().child("rooms").push();
101+
var ref = firebase.database().ref("rooms").push();
102102
var profileRef = ref.child(username);
103103

104104
// return it as a synchronized object

0 commit comments

Comments
 (0)