Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript files are not working in Grails 4.0.1 and assets-pipline 3.0.11 from other directories or custom directories. #395

Open
Mujadid-Ali opened this issue Jan 29, 2020 · 0 comments

Comments

@Mujadid-Ali
Copy link

Mujadid-Ali commented Jan 29, 2020

i am facing a strange issue. in grails 4.0.1
i have a javaScript file in my grails-app/assets/javascript directory which name is progress-spinner.js and their code is

//= require js/progressSpinner

basically it is pointing out another file that have actual javascript code named progressSpinner.js in directory grails-app/assets/lib/js/.
i have included that file in my gsp gape as

<asset:javascript src="progress-spinner.js"/>

but when i run the app and open the page the code does not execute. i have checked by browser inspect code option the both file are loaded as

<script type="text/javascript" src="/assets/js/progressSpinner.js?compile=false"></script>
<script type="text/javascript" src="/assets/progress-spinner.js?compile=false"></script>

in the middle of page. and it does not have any error.
the problem is that code from the file is not working when i click on the button.
i have also place my file direct in grails-app/assets/javascript folder and try to include in but code does not work. also i have tried to include in my application.groovy like this

grails.assets.includes = [
    "js/progressSpinner.js"
]

but it also does not work.
i am using grails 4.0.1, jdk 11.0.5 and asset-pipeline-grails:3.0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant