Created
March 19, 2015 09:05
-
-
Save robypez/8af7aae2bcaa50b3a61d to your computer and use it in GitHub Desktop.
directive
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
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