Skip to content

How to apply grails tag or GString in js files in assets path #373

Description

@wureka

I have a js file in assets/javascripts.
By applying <asset:javascript src="myfile.js"/> I can import it .
But now I want to apply grails tag and Gstring in my myfile.js. And it does not work.
For example in myfile.js, it contains:

data = ${queryResult.data};
<g:if test=${session.memberId}>
memberDisplayName = "${session.memberDisplayName}";
/g:if

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions