Fix for https://github.com/pineconellc/angular-foundation/issues/61 #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue #61 is hard to replicate.
To replicate it, you need to have a very large page, with lots of data and controllers.
(I had this sisue with one page and 25 controllers who each inherits the same main profile controller )
On the directive init, attrs.active is true but unparsed.
The expression is complex and has to wait all the other controllers to initialize to get evaluated correctly.
takes time to parse, but at the same time, the $watch is triggered.
This means the 'setActive' function is undefined in the $watch for this specific case where the $parse takes too long to eval.