Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 25th, 2013  |  syntax: JavaScript  |  size: 0.90 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var ConfirmationModule = angular.module('ConfirmationModule', []);
  2.  
  3. ConfirmationModule.factory('ConfirmationService', function($rootScope){
  4.   var sharedService = {};
  5.  
  6.   sharedService.sourceWarehouse  = 0;
  7.   sharedService.destinyWarehouse = 0;
  8.   sharedService.productList      = [];
  9.  
  10.   /**
  11.    * Send data from ProductPick Model to Confirmation Model
  12.    *
  13.    * @method sendProductList
  14.    * @param sourceWarehouse {Integer}
  15.    *  source warehouse ID
  16.    * @param destinyWarehouse {Integer}
  17.    *  destiny warehouse ID
  18.    * @param productList {Array Object}
  19.    *  product info and amounts
  20.    */
  21.   sharedService.sendProductList = function(sourceWarehouse, destinyWarehouse, productList){
  22.     this.sourceWarehouse  = sourceWarehouse;
  23.     this.destinyWarehouse = destinyWarehouse;
  24.     this.productList      = productList;
  25.  
  26.     $rootScope.$broadcast('sendProductList');
  27.   }
  28.  
  29.   return sharedService;
  30. });
clone this paste RAW Paste Data