I have a button that when clicked takes me back to my “home” view, this is what I have tried
<a ng-click="goToView('home')"><button>(Cancel) Back to home</button></a>
and
<a href="#/homePage"><button>(Cancel) Back to homePage.html</button></a>
my function
$scope.goToView = function(view){
console.log($state.go(view));
$state.go(view);
}
and my view in the routing
.state('home', {
url: '/homePage',
views: {
'homePageContent': {
templateUrl: 'homePage.html',
controller: 'homePageCtrl'
}
}
})
when clicking on the relevant buttons the view is navigated to properly in the url however the relevant view is not shown, what am I missing out on?