// Delete Note
app.controller('DeleteNoteCtrl', function($scope,noteService, $state, $ionicActionSheet){
$scope.notes = noteService.all;
$scope.showDetails = function(id){
$ionicActionSheet.show({
destructiveText: 'Delete',
titleText: 'Are You Sure?',
cancelText: 'Cancel',
destructiveButtonClicked: function(){
var rem = $scope.notes.$getRecord(id);
$scope.notes.$remove(rem);
return true;
}
});
}
});
No comments:
Post a Comment