angularobservableangular-broadcastangular-event-emitter

Listening to event from angular 4 component in angularjs controller


I'm working on a hybrid angular app. I need to listen to an event (an observable may be ) in the angularjs controller and the event would be triggered by angular 4 component. Is there any way we could actually accomplish this ?


Solution

  • It is not possible to achieve it with events. There are two other ways.

    1. Use localStorage to pass data from and to.
    2. You can use NG4 service, downgrade it to angularJS and set and get value from and to.

    Thanks!