Thank you! Perfect it worked!
I was doing something similar, but hiding and showing the add button
instead, I never thought of just hiding the entire view itself!
On Wednesday, December 31, 2014 3:19:17 AM UTC-5, 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 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.