所以,我在我的 index.html 中加载了一堆 .js 文件,代码如下......
<script src="Login/login.js"></script>
<script src="Home/home.js"></script>
<script src="Authentication/auth.js"></script>
当我在 login.js 中时,我可以简单地注入 auth 模块,它无需在 app.js 中(在父模块中)注入 auth 模块并且在 login.html 中也没有以下代码即可工作
<script src="Authentication/auth.js"></script>
任何人都可以帮我理解实现这一点的 Angular 机制吗?子状态如何能够注入在 index.html 中加载的模块?