Popover vs Modal


#1

I have popovers in my app. On phones I want to replace those popovers by fullscreen modals. Does anybody know how to do this???


#2

Use ionic.Platform to check which OS is using the app, then do whatever you like according to it.


#3

What I want is this:
In a menu I have a ng-click which opens a popover. But the popover doesn’t fit on a phone screen. My solution is to open the content in a modal that is fullscreen. It’s not about the OS. It’s about the size of the device. The problem is how to let a ng-click open the popover (that’s) what happens now instead open a modal with the content.


#4
ng-click="openPopOver()"

And in the relevant controller:

$scope.openPopOver = function() { 
      $ionicPopover.fromTemplateUrl('my-popover.html', {
          scope: $scope,
      }).then(function(popover) {
         popover.show();
      });
}

#5

This is how you open a popover. Not quite the answers for my questions. In the meantime I have a solution. In the controller I call a function. In that function I decide wether to open the popover or open the modal. Decision is made on the device width.
Thank you for respondent do much