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.

Mohammad Aslam
  • 250
  • 3
  • 13
  • 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 – charlietfl Jan 17 '16 at 17:00
  • Alternative would be 2 index.html...each in different directory then let server send index based on directory in url – charlietfl Jan 17 '16 at 17:02
  • thanks @charlietfl I used some of your pointers to provide a workaround. – Mohammad Aslam Feb 09 '16 at 17:26

1 Answers1

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?

Community
  • 1
  • 1
Kushal
  • 1,360
  • 6
  • 16