Last active
December 16, 2015 17:40
-
-
Save earthling-shruti/5472091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config/ApplicationResources.groovy: | |
modules = { | |
application { | |
resource url:'js/application.js' | |
} | |
xyz { | |
resource url:'js/xyz.js' | |
} | |
} | |
views/layout/main.gsp: | |
... | |
<g:javascript library="xyz"/> | |
<g:layoutHead/> | |
<r:layoutResources /> | |
</head> | |
views/something/edit.gsp: | |
... | |
<g:javascript library="xyz"/> | |
<r:layoutResources /> | |
<script> | |
$(document).ready(function() { | |
//some function call from xyz.js | |
}); | |
</script> | |
</head> | |
Error: | |
"Error processing GroovyPageView: Error executing tag <g:javascript>: Cannot add resource with disposition [defer] to this request - that disposition has already been rendered." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment