What's the correct way to communicate between controllers in AngularJS?

前端 未结 19 2439
猫巷女王i
猫巷女王i 2020-11-21 22:02

What\'s the correct way to communicate between controllers?

I\'m currently using a horrible fudge involving window:

function StockSubgro         


        
19条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-21 23:04

    You should use the Service , because $rootscope is access from whole Application , and it increases the load, or youc use the rootparams if your data is not more.

提交回复
热议问题