Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • Can you post what you have tried? Commented Oct 5, 2015 at 19:37
  • How are you logging it? Commented Oct 5, 2015 at 19:42
  • what is the value of user.data? is it an object? Commented Oct 5, 2015 at 19:42
  • :user is already available in your $state.params.user. So in your ProfileCtrl just access it via $state.params.user of course making sure that you have injected "$state" into your controller. Commented Oct 5, 2015 at 19:42
  • 1
    @uksz It actually worked, as JSON.stringify is not recursive and thus only converted the 1st level object to string. Try logging this in Chrome console and you will see the whole object. Otherwise try doing .controller('ProfileCtrl', function($stateParams) { console.log(JSON.stringify($stateParams.user)); }); in your current browser to see the user object. Commented Oct 5, 2015 at 19:52