popover not working on my android device(Version 4.4.2)
I searched everywhere but still can’t find the reason why popover control works fine on the chrome but not on my android device (Haven’t test on ios yet)?
I followed the official document here, http://ionicframework.com/docs/api/service/$ionicPopover/
I even add an alert inside openEventPopover function, still no luck to get alert message on my android phone, looks like popover event even not triggered from device.
Someone help me please.
Code below:
$ionicPopover.fromTemplateUrl('/app/cards/detailEvent.html', {
scope: $scope
}).then(function(popover) {
$scope.eventPopover = popover;
});
$scope.openEventPopover = function($event) {
alert("Hi");
$scope.eventPopover.show($event);
};
$scope.closeEventPopover = function() {
$scope.eventPopover.hide();
};
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.eventPopover.remove();
});
// Execute action on hide popover
$scope.$on('eventPopover.hidden', function() {
// Execute action
});
// Execute action on remove popover
$scope.$on('eventPopover.removed', function() {
// Execute action
});
HTML
<div class="row record-row">
<p class="col-25 col-top">Event:</p>
<p class="col-75">{{card.Event}}
<span>
<a class="assertive button button-icon icon ion-android-alarm"
ng-click="openEventPopover($event)">Event Detail
</a>
</span>
</p>
</div>