I just started learning angularjs and I am using angular-ui-router. I am trying to send data from one state to another using $state.go
but I have no success. He
When you say:
$state.go('private.visits', { name : "Object"});
You're not passing data to the private.visits
state, but rather you're setting a parameter to the private.visits
state, which doesn't even support parameters as you have not defined parameters for it in the state config. If you want to share data between states use a service, or if your states have a parent-child relationship then the child state will have access to the parent states data. Seeing as how you don't want the data to sow up in your URLs, I would use a service (getters/setters) to achieve this.