My angular application has two controllers. Here is a simplified version of the code snippet:
var app = angular.module('walkerApp', ['firebase']);
app.controller('AuthenticationController', function($scope) {
function login(user) {
...
}
});
app.controller('StepsDataController', function($scope) {
});
The StepsDataController is responsible for fetching data from a firebase backend, while the AuthenticationController manages user authentication. Whenever there is a change in the current user (such as through the login or register methods of the AuthenticationController), the StepsDataController should rebind to a specific set of data associated with that particular user.
I am looking for a way to achieve this functionality in Angular. It seems like I would need some kind of observer implementation, but I am unsure about the exact mechanism to use.