2

What is the best way to pass arguments between controllers in Angularjs? I am using the $rootscope to broadcast arguments but it doesn't seem to be the most efficient.

koque
  • 1,830
  • 5
  • 28
  • 49

1 Answers1

1

The best way to share data between controllers is with a Service.

It's described well in this answer https://stackoverflow.com/a/20181543/2503944

That answer uses a service to share products between controllers. You can apply that to whatever you need to share between yours.

MJL
  • 161
  • 2
  • 7