应用程序模块不可用,尽管已声明

App module not available, despite declaring it

本文关键字:声明 模块 应用程序      更新时间:2023-09-26

我以前在一个项目中使用过Angular,但试图再次快速设置一些东西会给我带来以下好处:

Module 'app' is not available! You either misspelled the module name or forgot to load it.

据我所知,我已经在app.js中正确地声明了app

为了方便,我做了一个小傻瓜:http://plnkr.co/edit/FWHQ5ZDAByOWsL9YeMUH?p=preview

您错过了源文件上的.

更换

`<script src='/app.js'></script>`

带有

`<script src='./app.js'></script>`