Having a really big JSON object in the Angular controller and ui-sref link, I want to pass this object to the template controller, which will be in the u-view.
I know that I can pass parameters for the state using ui-sref, but I do not want this object to appear in the address bar. In addition, I know that we can use the โallowโ parameter in the state, but I canโt find a way to pass data to the โallowโ function from the link. <b> Update
If I use $ state.go like this:
Router configuration
state('social.feed.detailed', url: '/:activityID' templateUrl: 'views/social/detailedactivity.html' )
in the template
<ums-social-activity ng-repeat="record in SOC_FEED_CTRL.records" activity="record" ui-sref-active="selected" ng-click="SOC_FEED_CTRL.goToDetailed(record)"> </ums-social-activity>
in the controller
$scope.SOC_FEED_CTRL.goToDetailed = (activity) ->
Then the parameter "activity" is not eliminated at all.
Update 2
If I change the route configuration to this:
state('social.feed.detailed', url: '/:activityID?activity' templateUrl: 'views/social/detailedactivity.html' )
Then the operation is the string "[object Object]"
javascript angularjs angular-ui-router
mkrakhin
source share