Skip to content

Instantly share code, notes, and snippets.

@jonathansolorzn
Created November 14, 2015 19:19
Show Gist options
  • Save jonathansolorzn/1b170ed39a557329372e to your computer and use it in GitHub Desktop.
Save jonathansolorzn/1b170ed39a557329372e to your computer and use it in GitHub Desktop.
Example controller where contentService is called and used
(function () {
'use strict';
angular
.module( 'app.purchases' )
.controller( 'PurchasesDashboardController', PurchasesDashboardController );
PurchasesDashboardController.$inject = [ '$scope', 'contentService' ];
function PurchasesDashboardController( $scope, contentService ) {
var vm = this;
//Here's where i use contentService, what i want to do is to improve this code to only have
//a simple call to a function from the service that will return the data.
contentService.content().success(function(data){
console.log(data);
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment