Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUrlUpdate(){
- var currentState = $location.search();
- //manipulate to pull out page number and turn into o and s
- if($scope.showSeeAll){
- state = {
- o:0,
- s:1
- }
- }
- //FIND IT FROM P VARIABLE
- if(!state.s){
- state.s = 10;
- }
- if(!state.o){
- stae.o=0;
- }
- //END FIND IT FROM P VARIABLE.
- $scope.loadData(currentState);
- }
- if($scope.waitForTabSelect){
- //we are in a tablist either this tab is currently selected.
- if($scope.isTabSelected){
- //TAB is already currently active.
- init();
- } else {
- logger.info('DistributorInventoryDirective - listening for tab_select');
- //TAB is not currently active.
- $scope.$on('TAB_SELECTED', init);
- }
- }else{
- //we init immediately, we're not in a tablist
- init();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement