我有我的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標籤嵌入它們。 –