我有我的Grails 3应用程序。我已将我的前端应用程序(使用Angular 2.1构建)放入src/main/webapp文件夹中。Grails 3应用程序无法加载* .js文件
在加载URL http://localhost:8080/的应用程序时,我将它重定向到Index.html页面。
但index.html页面没有加载
网址: - http://localhost:8080/static/app-name/index.html
而且我得到以下错误控制台。
GET http://localhost:8080/inline.js 的index.html:14
GET http://localhost:8080/main.78fb007fcde8966a4e95.bundle.js 的index.html:14
GET http://localhost:8080/styles.d63e17da56bb3a1ca523.bundle.js 的index.html:14
GET http://localhost:8080/main.78fb007fcde8966a4e95.bundle.js 404()
您是否正在使用默认资产管道?如果是这样,你应该把你的JavaScript文件放在:grails-app/assets/javascripts中,然后用g:asset标签嵌入它们。 –