我们在上一期中讲 $rootscope时,看到$rootscope是依赖$prase,其实不止是$rootscope,翻看angular的源码随便翻翻就可以发现很多地方是依赖于$parse的.而$parse的源码打开一看,它的代码量有接近两千行.翻开angular的api文档,官方只给出了简短的解释"Converts Angular expression into a function(将一个angular的表达式转化为一个函数)",心中神兽奔腾----就这么点功能为什么要"…
Launcher在应用启动的时候,需要加载AppWidget,shortcut等内容项,通过调用LauncherModel.startLoader(),开始加载的工作.launcherModel中加载好的内容会通过LauncherModel.Callbacks接口的回调函数将数据传给需要的组件,那先来看看Callbacks的定义: public interface Callbacks { public boolean setLoadOnResume(); public int getCurren…