Skip to content

Instantly share code, notes, and snippets.


katowulf/example.html Secret

Last active Aug 29, 2015
What would you like to do?
<div ng-controller="ctrl">
app.controller('ctrl', function($scope, Post) {
$ = new Post('post123');
app.factory('ref', function(FIREBASE_URL, Firebase) {
return function(path) {
return new Firebase(FIREBASE_URL).child(path);
app.factory('Post', function(ref, $firebase) {
return function(postId) {
return $firebase(ref('posts/'+postId)).$asObject();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment