I have a variable, which I got from a querystring in docA:
docA(mainView)
var cat = getUrlParameter('cat');
I also have an ng-click function in docB that handles different views:
docB(rightDrawer)
<li class="item" ng-click="newDay('Monday')">Monday</li>
$scope.newDay
$scope.newDay= function(day){
supersonic.ui.layers.push('http://localhost/principal.html?day='+day +'&cat='+cat);
supersonic.ui.drawers.close('right');
}
I'm trying to pass de var "cat" from docA to $scope.newDay
I tried:
calling $window.cat inside $scope.newDay, but got undefined, I assume it is because I'm trying to get a variable from docA inside a function in docB.
GOAL:
go to:
from the "scope.newDay" function using variable "cat" from docA and "day" from [docB]newDay('Monday')