Stas Arshanski
Stas Arshanski

Reputation: 422

How do I call an AngularJS service function inside a Redux Reducer?

I need to call a angularjs function inside a Redux Reducer. How should I do that?

The Reducer is written in node fasion: module.exports = ...

But the Angular Js factories or services are only accessible with Angularjs Injection.

How should I access those within the Redux reducer?

Upvotes: 0

Views: 137

Answers (1)

georgeawg
georgeawg

Reputation: 48968

There are two ways to get an AngularJS injector:

var injector = angular.injector(['ng']);

OR

var injector = angular.element(element);

For more inforation, see

Upvotes: 1

Related Questions