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
Post a Comment