Hi Hoàng,

Well, the best way to clean this up is what the article is telling you 
about injecting the needed data on the server, this will save you an extra 
request also.

If really can't include this using the server, you can still do it, but do 
not use angular for the processing of your data. You can get by with user 
$http via the injector, but I don't like that too much either.

It is possible to to, and you have found the way already. It's a bit of a 
kludge, but there is no way (aside from above methods) around it. You need 
the timeout, because angular needs to finish at least 1 digest cycle before 
everything is settled enough for your solution to work.

Does that make it more clear?
Regards
Sander

-- 
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.

Reply via email to