AngularJS-将提供程序注入module.config

AngularJS-将提供程序注入module.config,第1张

AngularJS-将提供程序注入module.config

您需要添加“
Provider”后缀,这是Angular知道的,但是就像shaunhusain在评论中说的那样,存在一些限制:

http://jsfiddle.net/g26n3/1/

angular.module("ab.core", [])  .provider("ab.core.provider", function () {  })  .config(["ab.core.providerProvider", function(p) {    ...    }]angular.module("ab", ["ab.core"])  .config(["ab.core.providerProvider", function(p) {    ...  }]

遵循命名约定,看起来不错,

.provider('camelCase', ...)



欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/5651783.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存