Skip to content Skip to sidebar Skip to footer

Angular Dependency Injection, Passing Values Between Modules Using Service

I have read about the dependency injection in angular. I thought to test it. But as I inject the module, I want to pass the values from one module to another (I am outputting on co

Solution 1:

You need to pass the name of the module as a dependency instead of the variable name.

Change:

varsisUser= angular.module("wbsislogin",[]);
varwbSis= angular.module("wbsis",["sisUser"]);

To:

varsisUser= angular.module("wbsislogin",[]);
varwbSis= angular.module("wbsis",["wbsislogin"]);

Post a Comment for "Angular Dependency Injection, Passing Values Between Modules Using Service"