Issue
I am trying to reload the parent from the child, however after lunching the reload link I am loosing the id variable from the link which make a bug.
For example instead of getting "Entity/account/Details/224563" I am getting Entity/account/Details/ and the code that I am using:
var accountstate = $myapp.findOverviewInjector().get("$state");
var idEntity= parseInt($state.params.entityId);
personstate.reload(accountstate.current, {id:idEntity}, { reload: true });
for extra details:
controller:"AccountDetailsCtrl"
name:"details"
params:{entity:"Acount"}
url:"/Entity/:entity/Details/:id?ids"
my question is how to call reload correctly without loosing the id just to know in my case I need reload "$state.go" will not achieve my goal and I try it already.
$state.go(accountstate.current, { id: $state.params.entityId }, { reload: accountstate.current });
it works, but it does not achieve the goal
big thanks in advance
Solution
the solution is $state.go(accountstate.current.current, { id: $state.params.entityId }, { reload: true });
Answered By - BilalMr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.