I have an angular application with two controller. Here's a simplified version of the code:
var app = angular.module('walkerApp', ['firebase']);
app.controller('AuthenticationController', function($scope) {
function login(user) {
...
}
});
app.controller('StepsDataController', function($scope) {
});
The StepsDataController serves up data from a firebase backend. The AuthenticationController handles user management. When the current user changes (via the login or register methods of the AuthenticationController,) the StepsDataController should rebind to a set of data specific to that user.
How do I do this in Angular? Obviously, I need some sort of observer implementation, but I'm not sure what the mechanism is.