Invoke modal from action sheet

Hi. I had similar problem and solved it from the following link:

buttonClicked: function(index) {
if(index === 0){
$scope.firstModal();
}
else if(index === 1){
$scope.secondModal();
}

   return true;

}