我遵循这个关于使用jhipster的美丽教程。我可以一起运行Maven和Grunt。我已经能够使用默认用户进行身份验证。我遇到麻烦的地方是创建一个新的实体。创建一个实体
http://jhipster.github.io/creating_an_entity.html
我跑
yo jhipster:entity foo
然后我的角度JavaScript文件以后作出的index.html文件中三个foo的js文件条目:
foo-router.js
foo-controller.js
foo-serrvice.js
预期页面没有出现在
http://localhost:8080/#/foo
我看到下面的控制台错误:
Uncaught ReferenceError: App is not defined foo-router.js:3
(anonymous function) foo-router.js:3
Uncaught ReferenceError: App is not defined foo-controller.js:3
(anonymous function) foo-controller.js:3
Uncaught ReferenceError: App is not defined foo-service.js:3
(anonymous function) foo-service.js:3
好吧我设法通过在三个javascript文件中用jhipsterApp替换App来实现它,并且我将它们的引用移至index.html中的所有javascript之后。他们可能只需要出现在定义了jhipsterApp的app.js之后。 –
你也许可以回答你自己的问题,然后标记它解决。 –