0

Suppose I have this template

<span>{{scopeVariable}}</span>

And suppose somewhere in the angular scope I modify the variable scopeVariable, which will make it display on the dom...Suppose the span with class lol is initially hidden (and I'd like it to remain that way) so I then execute a jquery statement to display it

$scope.scopeVariable = '<span class="lol">A whole bunch of stuff</span>';
$('.lol').show();

The problem is that the javascript will execute before the entire scopeVariable placeholder on the dom is replaced with the variable value hence span '.lol' remains hidden...

My question is, how do I get angular to detect when the lol span will finish rendering on the placeholder, so that I can then execute the show() function to make it show properly?

4

0 回答 0