I would like to know a similar angular function to the one below. I have seen where different people said i should use ng-show .
$$('#tab1').on('show', function () {
myApp.alert('Tab 1 is visible');
});
I would like to know a similar angular function to the one below. I have seen where different people said i should use ng-show .
$$('#tab1').on('show', function () {
myApp.alert('Tab 1 is visible');
});
If you want to register to an visibilityChanged
element instead of only changing the visibility of an element with ng-show
you could create a directive with a link function.
angular.module('example', []).directive('example', function() {
function link(scope, element, attrs) {
scope.$watch(attrs.ngShow, function() {
//check if visible
myApp.alert('Tab 1 is visible');
});
}
return {
link: link
};
}]);