Where to put duplicate calls to firebase in angularjs app?
问题 I need to get a set of products from firebase in every controller, and it would be ideal if I don't have to make an API call every single time. What is the best way to achieve this with the angularfire library? https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-firebasearray Right now I have (in coffeescript): app = angular.module 'EApp', ['ui.router', 'firebase'] app.config ($stateProvider, $urlRouterProvider) -> $stateProvider .state 'catalog', url: '/catalog'