R
R
Ru19712014-10-26 22:59:34
Domain Name System
Ru1971, 2014-10-26 22:59:34

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

2 answer(s)
4
4ikist, 2014-10-27
@4ikist

ng-cloak check?

R
Ru1971, 2014-10-27
@Ru1971

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 question

Ask a Question

731 491 924 answers to any question