Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Here my sample angular app, i'm trying to remove the # from the address by using
$locationprovider
. But it's not working for me in all my angular app.
so can anyone download my sample project and using the $locationprovider to remove the # and upload me again.
Even XMLHttpRequest are also not working.
Posted

1 solution

IF you want to delete the '#' tag from the address you must use $locationProvider on your module config.

$locationProvider.html5Mode({enabled: true, requireBase: false});


You must change your links. For example: href="/testtwo"

On the other hand the XMLHttpRequest. You are trying to access to local templates. You should run your examples using a web server or try to change your browser settings to allow XHR calls over the file:// protocol.

I tried it with AngularJS 1.4.3 version and work.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900