Having some trouble implementing AngularJS $state.go() with a parameter. It seems to work fine without the parameter, but when I try to pass one in, it's not working as expected. I've looked at several examples and tried different approaches, but haven't found a solution yet. I really need to display the parameter in the HTML view. Here is my state provider configuration:
$stateProvider
.state('home', {
url: '/',
views: {
'content@': {
templateUrl: 'content.html',
controller: 'dashCtrl'
}
},
params: {
obj: {
value:''
}
}
});
And here is my controller code:
dashboard.controller('dashCtrl', function ($scope, $http, $state, $stateParams){
$state.go('dash_home', {obj: {value:'admin'}});
});
Additionally, here is how my div is structured in the HTML:
<div>
<h1>welcome : {{value}} || {{obj.value}}</div>
Can anyone spot what might be causing the issue?