javascript - How to hide the # in the base URL using Angular? -


is possible hide # in url when using angular routing, base url ?

i know it's possible use $locationprovider.html5mode(true) remove #, want keep # others routes.

for exemple, following angular module :

var sampleapp = angular.module('sampleapp', ['ngroute']);  sampleapp.config(function($routeprovider) {   $routeprovider.       when('/', {         templateurl: '/templates/index.html'       }).       when('/additem', {         templateurl: '/templates/additem.html'       }).                 otherwise({         redirectto: '/'       }); }); 

currently, when go mysite.com, url mysite.com/#/, want clean url without #.

i cant use html5mode because want have url mysite.com/#/additem also.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -