Prevent tabs open content?


#1

Anyone know how to prevent a Tab to open a new content window? I’m trying to click on the tab bar icon and open only an Action Sheet.


#2

Hey @felipecm, so you mean you want to take a tab bar item, and then trigger an action sheet when it is clicked?

How are you structuring the markup? Do you have any example code? It could be as simple as adding a click handler and then returning false, but it might be more involved.


#3

Hey @max, yes. I want to only trigger an action sheet when it is clicked and stay on the same pane. Here is a brief of my markup.

I tried with the markup/code below but nothing happens. Is there a better approach?

<tab title="Actions" ng-click="openActionSheet()" icon="icon ion-search" ng-controller="ActionsCtrl">
<!-- nothing here -->
</tab>

app.controller('ActionsCtrl',function($scope,ActionSheet){

$scope.openActionSheet = function() {

    // Show the action sheet
    ActionSheet.show({...})
});
});