2

In my html I use a layout like this:

<h2>{{translation.settings}}</h2>

As you might guess, I am using a multi language setup.

Now, for some reason I am required to bind the angularjs controllers later than normal and so for a brief moment {{translation.settings}} is rendered on my page.

Obviously this is not preferable.

I have been working with knockout for a while and one way to handle such a inconvenience is to set the element's value through a html tag, e.g.:

<h2 data-bind="text: translation.settings"></h2> 

Is there a way in angularjs to set the inner element's text-value through a html-tag?

Or, since this is a possible XY problem, can I suppress the rendering of {{translation.settings}} in the <h2> element?

Stefan
  • 17,448
  • 11
  • 60
  • 79

1 Answers1

2

To prevent to show the template before it get a value use ng-cloack directive. You can use documentation here https://docs.angularjs.org/api/ng/directive/ngCloak

Kingmaker
  • 469
  • 1
  • 6
  • 20