Guest User

Untitled

a guest
Dec 27th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Attempt1:
  2.  
  3. angular.module("app456",[]).factory("factorySum",function() {
  4.  
  5. var totals = function(a,b) {
  6. return a*b;
  7. };
  8.  
  9. return { total: totals };
  10. });
  11.  
  12.  
  13.  
  14.  
  15.  
  16. Attempt2:
  17.  
  18.  
  19. angular.module("app456",[]).factory("factorySum",function() {
  20.  
  21. function totals(a,b) {
  22. return a*b;
  23. };
  24.  
  25. return { total: totals(a,b) };
  26. });
Advertisement
Add Comment
Please, Sign In to add comment