Skip to content

Instantly share code, notes, and snippets.

@gajus
Created October 11, 2014 09:54
Show Gist options
  • Save gajus/57e8865d5b6382289db9 to your computer and use it in GitHub Desktop.
Save gajus/57e8865d5b6382289db9 to your computer and use it in GitHub Desktop.
mochaApp.controller('DashboardController', ['$scope', 'api', 'util',
function ($scope, api, util) {
api.getGrossSales(null, function(err, data) {
// Just call util.whatever();
$scope.getGrossSales = data;
$('span#gross-sales-value').text(data.gross_sales);
});
.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment