hak5 / nano-tetra-modules

The Official WiFi Pineapple Module Repository for the NANO & TETRA
https://wifipineapple.com/modules
463 stars 143 forks source link

Status | Added defaulting "Auto Refresh" option for status module #61

Closed pidgy closed 5 years ago

pidgy commented 5 years ago

I find the interface is much more useful when the panes auto refresh themselves.

foxtrot commented 5 years ago

Thanks for making these improvments. As you're using $interval, it is required that you cancel it on scope destruction, otherwise the timer will continue in the background after the module has been exited.

You can fix this by appending the following code to the bottom of the AngularJS Controllers you define the intervals in.

$scope.$on('$destroy', function() {
    $interval.cancel($scope.yourIntervalVariable);
});

Cheers, Foxtrot

pidgy commented 5 years ago

Thanks for making these improvments. As you're using $interval, it is required that you cancel it on scope destruction, otherwise the timer will continue in the background after the module has been exited.

You can fix this by appending the following code to the bottom of the AngularJS Controllers you define the intervals in.

$scope.$on('$destroy', function() {
  $interval.cancel($scope.yourIntervalVariable);
});

Cheers, Foxtrot

Sorry for the late change, I have added the interval cancels. Nice catch as I had no idea this was required practice.

foxtrot commented 5 years ago

Thank you! :)

pidgy commented 5 years ago

Thank you! :)

See you at DEF CON!