Home >Web Front-end >JS Tutorial >AngularJS routing delete #symbol example sharing
This article mainly introduces the relevant information on how to delete the # symbol in AngularJS routing. I hope this article can help everyone. Friends in need can refer to it. I hope it can help everyone.
AngularJS routing solution to delete the # symbol
I recently made a web application, and there was a need to delete the # symbol in the angular routing.
For example:
http://example.com/ http://example.com/#/about http://example.com/#/contact
needs to be changed to
http://example.com/ http://example.com/about http://example.com/contact
This is provided by angular by default , so if you want to delete it, you need to configure it:
$locationProvider.html5Mode(true);
Then in the header of index.html, specify a base:
<base href="/" rel="external nofollow" >
This is ok. If necessary, inform yourself to try it!
Related recommendations:
AngularJS imitation WeChat picture gesture scaling code
AngularJS uses ui-route to achieve multi-layer nesting Routing
AngularJs user login problem handling
The above is the detailed content of AngularJS routing delete #symbol example sharing. For more information, please follow other related articles on the PHP Chinese website!