Jon*_*nas 2 grails layout grails-2.0
我正在使用Grails 2.0中的jQuery和Resources插件,我的布局如下:
<g:javascript library="jquery" />
<r:layoutResources/>
Run Code Online (Sandbox Code Playgroud)
使用该布局单击视图中的链接时,我在控制台中收到以下错误:
No module found with name [window]
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?
谢谢
乔纳斯
好的,我通过在Config.groovy中声明指向js文件的模块来解决这个问题:
grails.resources.modules = {
application {
resource url:'/js/application.js'
}
window {
resource url:'/js/window.js'
}
effects {
resource url:'/js/effects.js'
}
prototype {
resource url:'/js/prototype/prototype.js'
}
}
Run Code Online (Sandbox Code Playgroud)