--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
-- Cornelius Kölbel corneliu...@netknights.it +49 151 2960 1417 NetKnights GmbH http://www.netknights.it Landgraf-Karl-Str. 19, 34131 Kassel, Germany Tel: +49 561 3166797, Fax: +49 561 3166798 Amtsgericht Kassel, HRB 16405 Geschäftsführer: Cornelius Kölbel
Hi Carlos,
Delay the display of your view until your data is in. If you are using ngRouter, this is exactly where the resolve block comes in.
If you are not using a router, you can deal with this in your controller/directive
in the view you do something like:<div ng-if='vm.dataIn'>...your view...</div>
in your controller something like:
function myController($http) {
var vm=this;
//$http should be in a service, not in a controller!!, this is just a sample!
$http.get('goGetMyData').then(function (response) {
// handle the response, and put everything in place
// then 'unlock' the view:
vm.dataIn = true;
})
}
Does that help you?
Regards
Sander
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/-_gFemEMmiE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.