更新时间:2023-02-12 11:11:40
从 Angular 邮件列表中我得到了一个惊人的 线程 解释了服务、工厂和提供者以及它们的注入用法.我决定把它放在自己的问题这里
From the Angular mailing list I got an amazing thread that explains service vs factory vs provider and their injection usage. I decided to put it in its own question here
具体的答案是:这是设计使然,允许在配置时配置提供程序.
the specific answer is: it is so by design, to allow configuration of the provider at config time.