$('#eiAuditUI').load(eiAuditURL, function(responseText, textStatus, XMLHttpRequest) { if (textStatus == 'error') { $('#eiAuditUI').html('Unable to contact the Audit Tool. '); } else { angular.compile($('#eiAuditUI'))(); } }); $('#eiAuditUI').show();
This was with angular up to 0.10.3. As of 0.10.4, needed to apply '$apply()' to the compiled element, since angular.compile does not call $apply on the linked scope.
Being that we are bootstrapping the partial being pulled in itself, we need to now append the calls to compile from:
angular.compile($('#eiAuditUI'))();
to:
angular.compile($('#eiAuditUI'))().$apply();
What this was causing was that when the scope was called/compiled, the rendering didn't happen as was previously, unless some even happened, such as starting to fill out a form or moving a select list.
With the above change - everything back to normal.
No comments:
Post a Comment