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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -