Skip to content Skip to sidebar Skip to footer

Grails Controller Values (map) To Separate Javascript File

I have checked a lot of forums, but I haven't got my answer. So - I have a lot of JS code, so i keep it in separate .js file (not in .gsp view). But now I have problems of accessin

Solution 1:

You have to assign the values using inline JavaScript.

<script type="text/javascript">
 var gameInfo = ${gameInfo as JSON};
</script>

Post a Comment for "Grails Controller Values (map) To Separate Javascript File"