AngularJS的Provider, Value, Constant, Service, Factory, Decorator的区别与详解
首先,provider, value, constant, service, factory他们都是provider!(decorator小朋友先搬个小板凳坐在边上等会儿,现在还没轮到你出场哈~) provider是干啥的? provider可以为应用提供通用的服务,形式可以是常量,也可以是对象。 比如我们在controller里常用的$http就是AngularJS框架提供的provider~