How do I share $scope data between states in angularjs ui-router?

后端 未结 5 2016
执笔经年
执笔经年 2020-11-22 07:23

Without using a service or constructing watchers in the parent controller, how would one give children states access to the main controller\'s $scope.

5条回答
  •  -上瘾入骨i
    2020-11-22 08:22

    Isn't the simplest solution to group shared variables into a service you can access in every controller ? ...

提交回复
热议问题