Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tutorial App part 4 - ArticleDetailCtrl
.controller('ArticleDetailCtrl', ['$scope', '$stateParams', '$ionicLoading', 'Articles', function($scope, $stateParams, $ionicLoading, Articles) {
$ionicLoading.show();
Articles.get($stateParams.articleId).then(function(data) {
$ionicLoading.hide();
$scope.article = data[0];
}, function(error) {
console.log(error);
});
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.