@LouisR wrote:
Hi
I would like to pass a variable from the view scope ($scope.sort
) into the popover scope.
$scope.closeSortPopover`.
Once set in the popover, the variable 'goes out' of it with no issue though, with code below inI thought the popover scope was the same as the scope of the controller it comes from.
But it seems it's not the case.
Where is the popover scope ?
If I understand correctly from here the popover scope is a child of the controller scope. So how can I access it... ?FYI my popover is a list of
<ion-radio>
s offering different sorting opions for the big list in my main view.html:
<button ng-click="openSortPopover($event, sort)">
controllers.js
$ionicPopover.fromTemplateUrl('templates/computeSortPopover.html', { scope: $scope }).then(function(popover) { $scope.sortPopover = popover; }); $scope.openSortPopover = function($event, sort) { $scope.sortPopover.show($event); }; $scope.closeSortPopover = function(sort) { $scope.sortPopover.hide(); $scope.sort = sort; };
Posts: 2
Participants: 1