js里一说到延迟加载,大都离不开两种情形,即外部Js文件的延迟加载,以及网页图片的延迟加载:1.首先简单说一下js文件的3种延迟加载方式:(1)<scripttype=”text/javascript”defer>,defer属…
代码修改片段functionupdate(){varcounter=0;/**fixbyweiyjstart***/elements.sort(function(a,b){varvalue=$(a).offset().top-$(b).of…
1.resolvestate(配置路由时)的resolve参数:resolve:object,将会被注入controller去执行的函数,<string,function>形式。基于uiRouter的resolve是在加载con…