A neat way do decouple controller and model. It's a good practice to free the controller for any $scope data. Based on http://toddmotto.com/rethinking-angular-js-controllers/ with few syntax changes.