javascript - Throwing cannot get error after enabling html5Mode in AngularJS -


i using ui-router routes/states in app , urls having "#" remove , used $locationprovider -

function configstate($stateprovider, $urlrouterprovider, $locationprovider) {      $locationprovider.html5mode(true); 

added ngroute in module dependency , added <base href="/" > in index.html.

problem -

if using normal app in same tab , navigates other state, works but whenever pasted url in tab , hit enter throwing cannot /app_views/contacts url - http://localhost:9000/app_views/contacts

though hash in url works in both way manner.

you getting error because server not configured correctly. in other words when manually enter /app_views/contacts make request server page. work need configure server route traffic index.html page in order angular take on , display correct view.

here related post reloading page gives wrong request angularjs html5 mode


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -