rpocklin / ui-router-tabs

Idiot-proof tab panes with route support using Angular.js + Bootstrap 3 + UI Router
Other
244 stars 57 forks source link

Can't Get Dynamic Tab Data to Update #52

Closed rdrown closed 8 years ago

rdrown commented 8 years ago

I've enjoyed using your ui-router-tabs project, and have recently tried implementing a custom template with a heading icon that will be toggled based on a value I defined in options that is bound to service data representing the validation state of a form.

I'm receiving the changing Boolean value in my tabs controller, but it's not being "pushed" down into the corresponding tabs. If I hard-code the value, it will display as I expect, it's just not changing in response to the service data change.

I'm fairly new to Angular so I may well be doing something wrong or against the spirit of your meaning of dynamic tab data. I have prepared a Plunk http://plnkr.co/edit/iefvwcffSZmpfy83NGde?p=preview that demonstrates the issue.

On View 1, enter a valid email, which will make the form validate and the validation state will bubble up to the parent controller. I expect that the "ban-circle" (false) would toggle to a check mark (true, see view 2's heading), but it does not. Any suggestions about how to make this work would be much appreciated.

rdrown commented 8 years ago

I will close this issue based on this answer from Stack Overflow: http://stackoverflow.com/questions/34376653/extending-ui-router-tabs-to-display-form-validation-state/34392610#34392610