SHARE
TWEET

Untitled

a guest Dec 27th, 2014 181 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. factory:
  2. angular.module("app456",[]).factory("factorySum",function() {                                                                                                                                                                                                      
  3.  var total = 100;                                                                                                                                                                                                                                            
  4.  });
  5.  
  6. controller:
  7. angular.module("app123",["app456"]).controller("simpleController",["factorySum",function(factorySum) {                                
  8. this.sum = factorySum.total;                                                                                                
  9. }]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top