Skip to content

Instantly share code, notes, and snippets.

@robypez
Created March 19, 2015 09:05
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 robypez/8af7aae2bcaa50b3a61d to your computer and use it in GitHub Desktop.
Save robypez/8af7aae2bcaa50b3a61d to your computer and use it in GitHub Desktop.
directive
angular.module('starter')
.controller('NewsCtrl', function($scope, content, $cordovaSocialSharing, $sce, $ionicModal){
$scope.news = content;
content.getList('comments').then(function (comments) {
$scope.comments = comments;
});
$ionicModal.fromTemplateUrl('templates/comments.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal;
});
$scope.showComment = function() {
$scope.modal.show();
};
// Triggered in the login modal to close it
$scope.closeComment = function() {
$scope.modal.hide();
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment