md-tab problem with ng-repeat and md-on-select
Having md-tab with ng-repeat and md-on-select. The problem occure when changing ng-repeat array.
Actual Behavior:
What is the issue?When ng-repeat array changes, md-on-select is triggered for some of the elements of the tabs.What is the expected behavior?md-on-select should not be triggered.
CodePen
CodePen:http://codepen.io/djidel/pen/zKWEzGDetails:Clicking on any tab should result in console log with the tab label. Clicking on the button will replace the ng-repeat array, which will inveal the problem: getting console logs for some of the removed tabs.
Angular Versions:
Angular Version:1.5.5Angular Material Version:1.1.1
Additional Information:
Browser Type:ChromeBrowser Version:53OS:Windows
@topherfangio - sounds like a timing issue where the md-on-select expression trigger should be debounced.
Hey Guys, I'm running into similar issue. Is the any work around for not to trigger the md-on-select with ng-repeat of tabs where the number of tabs dynamically change on events.
Thanks for the help!
Hey, I'm not sure, but $scope.$watch('md-selected',your_listener_function) might be a work around.
Thanks. I'm using ng-click instead of md-on-select. That seems to have fixed the issue.