Created
November 14, 2015 19:19
-
-
Save jonathansolorzn/1b170ed39a557329372e to your computer and use it in GitHub Desktop.
Example controller where contentService is called and used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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