Executing code at the end of angular initialization, and ngCloak display
问题 I have a webpage written in angular with an ngCloak directive. It is loaded in a dynamically sized iframe with pym.js. The trouble is that the page does not appear unless I resize the browser or trigger a resize event, or call pymChild.sendHeight() after the page loads. I don't see any events associated with ngCloak though. Is there an angular event for "page is rendered, controllers are initialized"? 回答1: There is the $timeout service: $timeout(function() { // this code will execute after