Skip to content

Instantly share code, notes, and snippets.

@vitaliy-bobrov
Created February 10, 2015 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitaliy-bobrov/ed376e3f222a9aa4f827 to your computer and use it in GitHub Desktop.
Save vitaliy-bobrov/ed376e3f222a9aa4f827 to your computer and use it in GitHub Desktop.
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