I'm currently working with AngularJS and the Angular UI Bootstrap.
I've encountered an issue that I initially thought was related to scope, then initialization, but now I'm stuck trying to figure out what's causing the problem. I've included a link to a Plunker in hopes that someone can help me troubleshoot.
Here's the scenario: A user selects a donut they want to purchase. If the donut isn't available daily, a modal pops up prompting them to choose a date for their order. The problem lies in the fact that the datepicker doesn't seem to recognize the value of $scope.theActiveDonut
. It defaults back to the Cream Donut upon initialization, even though my console log and angular.element($0).scope()
show that $scope.theActiveDonut
has been updated. This discrepancy is visible in the console.log()
.
Link to my Plunker: http://plnkr.co/edit/rziyPLvsiiZB346qmSC5?p=preview
Even though the console.log()
confirms that $scope.theActiveDonut
has changed, within $scope.thingy
, it always reverts back to the Cream Donut value.