0

I have 2 controllers ConfigurationController.js and CartController.js. I want to pass configuration data to cart.

I tried using below:-

$rootScope.value1 = '---';

$rootScope.value2 = '---';

$rootScope.value3 = '---';

and so on...............

But it will increase $rootScope size in browser memory and even forth and back we have to manage $rootScope value.

Is any other way in AngularJS that I can handle same situation in better way.
Community
  • 1
  • 1
Chetan Sharma
  • 334
  • 2
  • 11

1 Answers1

1

In angularJS this the way where you can pass value between the controller.js.

Othen than that you can use any StateServer technique, if data is growing in any size.

But both $scope or $rootscope will carry same memory, just way of communication is different.