0

I'm new in angular, bower, grunt, etc stuff so I completely stuck with current issue. My project is built based on angular. In my index.html path to js/css like this

<script src="/scripts/shared/flow-item.js"></script>

after compiling with grunt path to js/css in index.html

<script src="scripts/app.da1aee60.js">

so that if i deploy project in ROOT on tomcat everything works perfect but if i deploy it in some folder like MyProject/ and call index.html we see application still looks for scripts by path http://localhost:8080/scripts/app.da1aee60.js instead http://localhost:8080/MyProject/scripts/app.da1aee60.js Is it possible in some say project look for script in proper path?

1

1 Answer 1

0

You can set base path in html (inside head tag):

<base href="/scripts/MyProject/" />
Sign up to request clarification or add additional context in comments.

1 Comment

no, the idea path to script should be localhost:8080/MyProject/scripts if I deploy project in folder MyProject and changing href to MyProject/script doesnt work if you use node to test project or if you deploy it on ROOT. I think I should add deploy folder dynamically in some way

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.