-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrays under scope.vm of directive undefined #840
Comments
@yosiasz This happens because you are trying to access the array inside the |
thanks @bampakoa!!! junk! been staring at this code too long. |
@bampakoa question. but controller is being called before .directive?
|
@yosiasz They are not executed in the order that you declare it. Even if you do this:
the runtime order will be the same. Let me clarify if you did not get it. |
Very informative! So I will need to figure out how to populate that array so that linkFunc has access to that array. thanks! |
Is this tribal knowledge or is there documentation for this behavior? |
I think you can find related information on the AngularJS official documentation. |
Greetings,
When following Angular 1.x style guide for directives, if I am referencing the array scope.vm.virtStats from the controller, it comes back as undefined. but if I reference simple object from the controller such as scope.vm.title, it does return a value. Why is that? Because I do see scope.vm as having that virtStats
array in the console.
The text was updated successfully, but these errors were encountered: