我之前在一个项目中使用过 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>`
关于javascript - 尽管声明了应用程序模块不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34768233/