Skip to content

tab hidden/shown event should give index of tab hidden/shown #634

@gregaton

Description

@gregaton

I'm currently using one controller to handle all my tabs (they are dynamically generated). In this case it would be very helpful to know which tab got selected when the shown/hidden event is fired.
For me the index would be fine.

All that's needed as far as I can tell is that the code for the tab directive after $scope.$watch('isVisible', function(value) { is changed from

$rootScope.$broadcast('tab.hidden');
...
$rootScope.$broadcast('tab.shown');

to

$rootScope.$broadcast('tab.hidden', $scope.$index);
...
$rootScope.$broadcast('tab.shown', $scope.$index);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions