角$ viewContentLoaded事件活动范围 [英] Angular $viewContentLoaded event activoty range

查看:61
本文介绍了角$ viewContentLoaded事件活动范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ viewContentLoaded事件是否包含诸如加载/渲染图像之类的资产?

Does $viewContentLoaded event include assets like images loading/rendering?

我想确定的是,当我听此事件时,可以确定该视图已完全渲染,并且不会出现闪烁或部分图像渲染吗?

What i want to determine is that when i listen to this event can i be sure, that view is fully rendered and there will be no flickering or partial image rendering?

还是仅指示视图的html何时准备好并插入?

Or it just indicate when the html of the view is ready and inserted?

推荐答案

只是视图的HTML.AngularJS不会神奇地监听页面上所有其他资源的load事件.相反,它会在追加并编译HTML后盲目地发出 $ viewContentLoaded 事件.

Just the HTML of the view, unfortunately. AngularJS does not magically listen to the load event of every other resource on the page. Instead, it just blindly emits the $viewContentLoaded event once it appends and compiles the HTML.

您可以查看自己的源代码.

这篇关于角$ viewContentLoaded事件活动范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆