I actually made some progress by adding $(document).ready. However, while the plnkr code now works the real code still does not work. The reason is that the testString value is actually loaded asynchronously. I simulated this with a setTimeout in an updated plnkr. As can be seen, the 'alert(scope.testString)' is being executed before testString has been set. How can I assure my script is only executed once the controller function is all done?
http://plnkr.co/edit/WOsQ7qfvHOPJRHoUIJCR?p=preview -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
