Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
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
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