Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1.  
  2.  
  3. function onUrlUpdate(){
  4. var currentState = $location.search();
  5. //manipulate to pull out page number and turn into o and s
  6.  
  7. if($scope.showSeeAll){
  8. state = {
  9. o:0,
  10. s:1
  11. }
  12. }
  13. //FIND IT FROM P VARIABLE
  14. if(!state.s){
  15. state.s = 10;
  16. }
  17. if(!state.o){
  18. stae.o=0;
  19. }
  20. //END FIND IT FROM P VARIABLE.
  21.  
  22. $scope.loadData(currentState);
  23.  
  24. }
  25.  
  26.  
  27.  
  28. if($scope.waitForTabSelect){
  29. //we are in a tablist either this tab is currently selected.
  30. if($scope.isTabSelected){
  31. //TAB is already currently active.
  32. init();
  33. } else {
  34.  
  35. logger.info('DistributorInventoryDirective - listening for tab_select');
  36. //TAB is not currently active.
  37. $scope.$on('TAB_SELECTED', init);
  38. }
  39. }else{
  40. //we init immediately, we're not in a tablist
  41. init();
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement