Answer the question
In order to leave comments, you need to log in
How to track the completion of ng-html-bind?
Good day!
The next task is
to track the end of the binding
if in more detail I upload a very large document to the SCOP and display it using angularjs ng-html-bind. After the document is loaded, you need to display a completion message with some data about the document
Answer the question
In order to leave comments, you need to log in
ng-cloak is not suitable since the main focus is on binding complete (display a message about the end).
Applied the following solution:
The document is enclosed in a certain container with a unique attribute.
After that, a certain loop is launched (using setTimeout) in which it is checked whether the element with the attribute exists. If yes, stop the loop and display a message.
$scope = '' + VeryBigDocumentContent + '';
var timeOut = function () {
if ( $('div[data-atr="Attr"]').length ) {
ToDo();
return;
}
setTimeout(timeOut , 500);
}
timeOut();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question