Saturday, October 14, 2017

Able to scroll the background list while ionicpopup is opened

I have an ionic popup inside the ionic modal when i press the popup it shows the popup but i could able to scroll the ionic modal list as well as able to do all the operations but if i use the ionic popup without ionic modal these background scrolls are restricted can anyone tell me why the background scrolling happens when ionic popup is used in ionic modal.

'use strict';
(function () {
  angular.module('main')
.service('ModalService', ModalService);
ModalService.$inject = ['$ionicModal', '$log'];
function ModalService ($ionicModal, $log) {
var init = function (tpl, $scope) {
  var promise;
  var a = $scope;
  $scope = a;

  promise = $ionicModal.fromTemplateUrl(tpl, {
    scope: $scope,
    animation: 'slide-in-up'
  }).then(function (modal) {
    $scope.modal = modal;
    return modal;
  });

  $scope.openModal = function () {
    $log.log('openModal function got clicked', $scope);
    $scope.modal.show();
  };

  $scope.closeModal = function () {
    $scope.modal.hide();
  };

  $scope.$on('$destroy', function () {
    $scope.modal.remove();
  });

  return promise;
};

return {
  init: init
};

}
})();

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/10/14/able-to-scroll-the-background-list-while-ionicpopup-is-opened/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment