0

I have a problem whit ng-show or ng-if in AngularJS, because I have, for example, this code:

  <div id="publicidad-principal" ng-if="publicidadPrincipal"></div>

and in the controller I have the correct way:

  $scope.publicidadPrincipal = false;

Now, when I open the page, for a second i see the DIV and then it is hidden, my question is: are there any way to have the div all the time hidden? then you can push a button and show it, but this is not the problem.

1 Answer 1

1

You can try:

<div id="publicidad-principal" ng-show="publicidadPrincipal" ng-cloak></div>

And here is the documentation for ngCloak.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.