UI Router: get params of "to" and "from" state with $transitions service

Viewed 1911

I'm trying to use $transitions service instead of $stateParams like there for listening on state changing, but can't get state params. I'm using property of StateObject, but instead of getting for example {id: 123}, i got {id: e}, where e is a object in which i can't find a value. Anybody help with this ?

$transitions.onStart({ }, function(trans) {
    console.log(trans.$from().params);
}

I noticed that trans.params() return "to" state params.

1 Answers
Related