How to communicate between controllers of two different modules in AngularJs

前端 未结 2 670
太阳男子
太阳男子 2020-12-20 02:52

I want to know that can we communicate between two different controllers in AngularJS. Suppose I have Two modules,
Plunker: http://plnkr.co/edit/if0MQwlx9WHrD8XnMi2t?p=

2条回答
  •  离开以前
    2020-12-20 03:00

    your plunker has a very minor issue.

    change this

         angular.module('myApp', [])
    

    to

         angular.module('myApp', ['myNewApp'])
    

提交回复
热议问题