did you find that it worked ok? > On Dec 31, 2014, at 1:06 PM, Carlos Moreira <[email protected]> > wrote: > > Hmm.. the app I am working on is using Cordova, but havn't tested on a > physical device yet. > > I will do so and let you know my results. > > On Wednesday, December 31, 2014 3:59:56 PM UTC-5, geoffrey emery wrote: > One thing i just noticed recently when doing a resolve on a promise using > ngrouter is that its completely bombing when wrapping it in cordova when i > wrap it for all ios and some older android devices. Have you heard of that > before? > > On Wednesday, December 31, 2014 12:19:17 AM UTC-8, Sander Elias wrote: > 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 > <https://groups.google.com/d/topic/angular/-_gFemEMmiE/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/angular > <http://groups.google.com/group/angular>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>.
-- 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.
