Search code examples
angularjsangular-ui-bootstrapangular-ui-bootstrap-tab

UI Bootstrap: Execute specific function before tab changes


As in the title writes, is it possible to intercept tab change event and execute some function before that occurs?


Solution

  • Yes you can, just add an ng-click on the uib-tab directive

    Here's a demo plunker (note how the code runs before the view changes).