importing.js 476 B

123456789101112131415161718192021
  1. import App from '../base'
  2. App.controller('ImportingController', [
  3. '$interval',
  4. '$scope',
  5. '$timeout',
  6. '$window',
  7. function ($interval, $scope, $timeout, $window) {
  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. ])