How to show ionicPopover by default


#1

how to show ionicPopover by default, don’t clik or any other event. Once the page or the view loaded, show the popover?

cmr.controller(‘JoinMeeting’, function($scope, $ionicPopover) {
$ionicPopover.fromTemplateUrl(‘joinMrTips.html’, {
scope: $scope,
}).then(function(popover) {
$scope.popover = popover;
});
$scope.$on(’$viewContentLoaded’,function(){
$scope.popover.show();
});
})


#2

Add event target as popover argument, I supposed that trigger the event by clicking “(’#element’)” dom element.

cmr.controller(‘JoinMeeting’, function($scope, $ionicPopover) {
$ionicPopover.fromTemplateUrl(‘joinMrTips.html’, {
scope: $scope,
}).then(function(popover) {
$scope.popover = popover;
popover.show(’#element’);
});