Angular1 <-> Angular2 Bridge accessing $rootScope


I use the following upgrade/downgrade bridge to have Angular1 and Angular2 side by side in one application.

My question is if there is any possiblity to access Angular1 $rootScope from the Angular2 service. To be clear I am not asking about what is the equivalent for $rootScope in Angular2.


So I will answer my own question.

You have to upgrade the $rootScope in the following manner:


Then it can be injected in the Angular2 service like follows:

class ExampleAngular2Service {
    constructor(@Inject('$rootScope') private _rootScope: any) {}

Answered By – Ɓukasz Rzeszotarski

Answer Checked By – Willingham (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.