I am attempting to create a clickable button within the $ionicLoading template. I need to execute some code when that button is clicked. Unfortunately, it seems like ng-click is not working. Is there a workaround for this issue? Or am I making a critical assumption here? PS: I am new to Angular and Ionic.
$ionicLoading.show({
template: '<ion-spinner></ion-spinner><br /><br /><p>Synchronizing...</p>'
});
//stopSync function does not trigger
$scope.stopSync = function(){
$ionicLoading.hide();
}
//Displays the 'Stop Sync' Button after two seconds
//for the user to click and run the stopSync function
$timeout(function() {
$ionicLoading.show({
template: '<ion-spinner></ion-spinner><br /><br /><p>Synchronizing...</p><button class="button button-clear" onclick="stopSync()">Stop Sync</button>'
});
}, 2000);