I have a weird issue I don't understand:
I'm using ui-router. Why do I get this results when I console.log in app.run():
app.run(function ($state) { console.log($state); // output: Object{params:{sitename:"mysite"},current:{...},... other properties} console.log($state.params); // output: Object {} First I print out $state and it has a "params" property which is an object with a property called "sitename". Then I print out the $state.params property and it's suddenly empty.
Can anyone explain this?
BTW. Also tried this but same result
console.log($state["params"]); // output: Object {}
$stateParamsservice?