In my infoDisplay(member)
I need to access the ng-init value specific to the div that I clicked on from the $scope and manipulate the value. How do I do so?
<div ng-repeat="member in memberData">
<div class="card" ng-init="cardClicked = 'false'">
<div ng-click="infoDisplay(member)">
</div>
</div>
</div>
The Javascript:
$scope.infoDisplay = function (member) {
if (settings.useApiInfo == 'false') {
var url = settings.directoryUrl + member.Id;
var openUrl = cordova.InAppBrowser.open(url, '_system', 'location = yes');
}
else {
cardClicked = { 'true': 'false', 'false': 'true' }[cardClicked];
}
}
The first part works, it is to open a url in my mobile app. I just need the second part but can't get it working.