Ng-click restrained within ion-slide


#1

I have multiple slide boxes being generated by ng-repeat. For each I wanted to have a section that will appear underneath the containing Slide box when the button in the ion-slide is clicked. The code below explains what am I trying to do and what does and does not work. Any help would be greatly appreciated!

<ion-slide-box show-pager="false">
							  
	<ion-slide>
		TEST111111111111
	</ion-slide>

	<ion-slide>
		TEST222222222222
	</ion-slide>

	<ion-slide>
		TEST333333333333
		
		<button class="button button-dark" ng-click="test = !test">
		Test
		</button>

		Works > True or False? > {{test}}
	</ion-slide>

</ion-slide-box>

Does not work > True or False? > {{test}}

#2

It’s because of how scope works for out directives.

$scope.data ={'test': 'true'};