An idiomatic way of implementing Firebase in Angular.js