Passing data from one route view to another

前端 未结 3 895
情深已故
情深已故 2021-01-24 18:19

I want to pass some values from one view to another in Angularjs using ui-Router.
I don\'t want to use $rootScope to save data or create a new services ( as I have many view

3条回答
  •  一生所求
    2021-01-24 19:06

    Easiest way would be to store all the data directly into the $routeParams either through route or query string.

    routeUrl: /foods/:quality/:stars
    

    then in your controller you can access

    $routeParams.quality - $routeParams.stars
    

提交回复
热议问题