Help! How do I make option labels conditional in Action Sheets?

I want the options in my Ionic action sheet to change text based on a condition. Specifically, I want the option to read “Flag” if a list item is not flagged ($scope.flag = false), and “Unflag” if it’s flagged ($scope.flag = true).

Right now, I have the text label reading:
<div ng-show="flag">Flag</div> <div ng-show="!flag">Unflag</div>

But it’s not working. Instead, all I see are both options. Does anyone know how to fix this? My full code is below and in this codepen.


      Item 1


angular.module('ionicApp', ['ionic'])
.controller('MyCtrl', function($scope, $timeout, $ionicActionSheet, $ionicListDelegate) {
   $scope.flag = true;
    $scope.showActionSheet = function() {
     // Show the action sheet
     var hideSheet = ${
       buttons: [
         { text: '<div ng-show="flag">Flag</div><div ng-show="!flag">Unflag</div>' },
       titleText: 'Action Sheet',
       cancelText: 'Cancel',
       cancel: function() {
            // add cancel code..
       buttonClicked: function(index) {
            $scope.flag = !$scope.flag ;  
            return true;

I’m having this same issue, any updates on a fix?

Was anyone able to solve this issue?

$scope.showActionsheet = function() {

  titleText: '',
  destructiveText: '<span ng-if=\'results.status!==\'Voided\'\'><i class="icon ion-trash-a"></i> Void Bill</span>',
  cancelText: 'Cancel',
  cancel: function() {
  destructiveButtonClicked: function() {
    return true;

Would really appreciate if someone could help with this.