0

In the example below I do not want the values "A" og "B" to be visible until JavaScript has been loaded and $scope.displayA has been set by the return of some ajax call.

<span ng-show="displayA">A</span>
<span ng-hide="displayA">B</span>

What is the best way to achieve this?

3
  • stackoverflow.com/questions/11249768/… Commented Jan 28, 2014 at 8:09
  • ok. I thought it would be enough for you to see that you needed two things: ng-cloak and a css-rule. Commented Jan 28, 2014 at 8:31
  • (I deleted my previous comment by mistake:) The answer to the other question you are referring to provides additional and valuable information, but it does not answer my question, which is how do I achieve this... Commented Jan 28, 2014 at 8:39

1 Answer 1

1

Just use ng-cloak on them. Link to docs: http://docs.angularjs.org/api/ng.directive: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.