importing.js 443 B

123456789101112131415161718192021
  1. define(['base'], function(App) {
  2. App.controller('ImportingController', function(
  3. $interval,
  4. $scope,
  5. $timeout,
  6. $window
  7. ) {
  8. $interval(function() {
  9. $scope.state.load_progress += 5
  10. if ($scope.state.load_progress > 100) {
  11. $scope.state.load_progress = 20
  12. }
  13. }, 500)
  14. $timeout(function() {
  15. $window.location.reload()
  16. }, 5000)
  17. $scope.state = {
  18. load_progress: 20
  19. }
  20. })
  21. })