0

I have a project with one file one.html and another file two.html. File one.html works with jquery and is bound to root ("/") and two.html works with angularJS and the route is "/two.html#/partialtemplate".

What can I do to remove "/two.html#" from the route? I don't want this to show in the URL.

I have tried $locationProvider.html5mode(true) but it didn't work because the base URL("/one.html") is already bound to one.html.

3
  • You would need to combine both pages functionality into one index.html to do what you are asking. With 2 files server wouldn't know which one to send the way you are suggesting. Explanation of your current configuration is a little bit unclear Commented Jan 17, 2016 at 17:00
  • Alternative would be 2 index.html...each in different directory then let server send index based on directory in url Commented Jan 17, 2016 at 17:02
  • thanks @charlietfl I used some of your pointers to provide a workaround. Commented Feb 9, 2016 at 17:26

1 Answer 1

0

Sol:

Do not load the $routeProvider by removing the ui router file form the index page where you dont want routing

Some references: 1) Disable angularJs routing, routeprovider already gone

2) How to disable routing in angularjs?

Sign up to request clarification or add additional context in comments.

Comments

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.