Delay in Angularjs used in file . cshtml

Asked

Viewed 36 times

0

I have a page that when starting it gives a Daley in the checkbox and in the text field as in the figure below: inserir a descrição da imagem aqui

someone knows me why this happens, and a possible solution

  • It’s really hard to know what the problem is without seeing the code.

  • Ready put the whole code not only part of the image

  • I think a ng-cloak help, but really, there is no sense in using Angularjs on this screen either on account of the server mount the screen, or the misuse of two way data binding of Angularjs without due use of ng-model. I recommend reading the tutorial angularjs.

1 answer

1


The cause of this is somewhat obvious. HTML is always run linearly, from top to bottom.

This way, the HTML markup is being created even before your controller have the values filled. This is because, by default, the Section scripts is rendered in end of HTML file (of course this may have been changed, but everything indicates that this is it). If you inspect the page by browser will see this clearly.

An alternative is to process the item Indicator before HTML. Or else, make the call via Angularjs and handle everything by yourself.

The way you are using Angularjs is extremely unusual, although it is nothing out of this world, it is something that practically goes against the idea of Angularjs. It would be a great idea to reconsider this and start working in the right way or abandon the use of technology. After all, if the data will be returned and the views will be mounted by the server that Angularjs serves?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.