What's the best way to direct a user to the home page if they happen to refresh from any other route (or state if you're using ui-router, as I am).
For example - I want them to begin on the inventory
page. If they want to make edits, they travel to the edits
page, but if they refresh that page, they go straight to the inventory
route again.
I havn't used the ui-router but in ng-route we can do it like this
<body ng-controller="topController"> <div ng-view></div> </body>
$location.path("/")
assuming that "/" is your main page where you want to redirect after refresh, don't forget to define $location