Skip to content

Commit

Permalink
Fixed incorrect code samples in guides (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Wenger committed Jun 23, 2016
1 parent 91b434c commit 859e73b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/guide/beyond-angularfire.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This is easiest to accomplish with an example, so read the comments carefully.
```js
app.controller("SampleCtrl", ["$scope", "$timeout", function($scope, $timeout) {
// create a reference to our Firebase database
var ref = firebase.database.ref();
var ref = firebase.database().ref();

// read data from the database into a local scope variable
ref.on("value", function(snapshot) {
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/synchronized-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var app = angular.module("sampleApp", ["firebase"]);
// inject $firebaseObject into our controller
app.controller("ProfileCtrl", ["$scope", "$firebaseObject",
function($scope, $firebaseObject) {
var ref = firebase.database.ref();
var ref = firebase.database().ref();
// download physicsmarie's profile data into a local object
// all server changes are applied in realtime
$scope.profile = $firebaseObject(ref.child('profiles').child('physicsmarie'));
Expand Down Expand Up @@ -98,7 +98,7 @@ app.factory("Profile", ["$firebaseObject",
return function(username) {
// create a reference to the database node where we will store our data
var randomRoomId = Math.round(Math.random() * 100000000);
var ref = firebase.database.ref().child("rooms").push();
var ref = firebase.database().ref("rooms").push();
var profileRef = ref.child(username);

// return it as a synchronized object
Expand Down

0 comments on commit 859e73b

Please sign in to comment.