AngularJS v1.5.8
I have a fairly simple app that has only two pages - Home page and a page with a ui-grid that displays records. If you refresh the page through the browser or F5 it seems to restart the App and goes back to the Home page.
I over came that by duplicating the route for the Home page but on the first one in the list I left the "url" attribute an empty string and I changed the "name" atrtibute of the duplicate.
var baseStates = [
{
name: 'default_app_home',
id: 'HomePage',
display: 'Track Loads',
url: '',
templateUrl: '/app/main/modules/home-page/track-loads.html',
showInMenu: true,
showOnHomePage: true,
allowAnonymous: true,
},
{
name: 'HomePage',
id: 'HomePageReal',
display: 'Track Loads',
url: '/modules/trackloads',
templateUrl: '/app/main/modules/home-page/track-loads.html',
showInMenu: true,
showOnHomePage: true,
allowAnonymous: true,
}, ................
This works on localhost and from a smart phone once deployed BUT when I Published to the web site the desk top refresh takes the user back to the Home page.
Does any one know what might be causing this and have a remedy? Thanks.