Pass object to a controller using state.go() in angularJs -
so want pass object(json)(ex: person entity) parameter state.go() without send url. tried using params this
.state('send-to',{ url:'/:id/options', views:{ 'content@':{ templateurl:'page.jsp', params: ['ref'], controller:'optionctrl' } } })
and in controller1 use this:
$state.go('home.referentiel.option',{id:$scope.selected,ref:p});
and in controller 'optionctrl' use this:
$scope.selectedreferentiel = $stateparams.ref;
thanks
Comments
Post a Comment