Skip to content

Instantly share code, notes, and snippets.


katowulf/controller.js Secret

Created Aug 8, 2014
What would you like to do?
app.controller('ctrl', function(posts, $scope) {
var postId = 'post123';
posts.$loaded(function() {
$ = posts.$getRecord(postId);
app.factory('Posts', function(FIREBASE_URL, Firebase, $firebase) {
var ref = new Firebase(FIREBASE_URL + 'posts');
return $firebase(ref).$asArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment