Value (used often)
The simplest service used for sharing a value that is used througthout your app repeatedly
最简单的服务,一般用于封装应用里重复需要用到的一些值。使用情况:常用
Factory (Most commonly used)
Shares methods and objects
封装一些公用的方法和对象。使用情况:最常用
Service (Rarely used)
Shares instances of methods and objects
封装一些公用方法和对象的实例。使用情况:较少用
Provider (Commonly used)
Shares methods and objects(like a Factory),but allows for
configuration
功能和Factory很像,封装一些公用的方法和对象,允许配置。使用情况:常用
Constant
Share a value within application configuration
封装一些和程序配置相关的值












网友评论