Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

102
Vistas
Files in disorder

When I refresh the page I got the questions in disorder - can you help me please?

This is mst files, when I refresh the page sometimes I got the first steps but some times I refresh the pages I can have step 2 or step 5 the files come in disorder and I want the files to be returned in order when I refresh the page.

init() {
    const list = [];
    const $this = this;
    const $files = [
      '/assets/js/template/steps/step_1.mst',
      '/assets/js/template/steps/step_2.mst',
      '/assets/js/template/steps/step_3.mst',
      '/assets/js/template/steps/step_4.mst',
      '/assets/js/template/steps/step_5.mst',
      '/assets/js/template/steps/step_6.mst',
      '/assets/js/template/steps/step_7.mst',
    ];

    $this.addLoading();
    $files.forEach(function (item) {
      list.push(
        fetch(item)
          .then((response) => response.text())
          .then((template) => {
            Mustache.parse(template);
            const output = Mustache.render(template, {});
            document
              .querySelector('.js-simulator-form')
              .insertAdjacentHTML('beforeend', output);
              // console.log(output);
          })
          .catch((error) =>
            console.log('Unable to get the template: ', error.message)
          )
          .finally(function () {
            return true;
          })
      );
      return true;
    });

    Promise.all(list).finally(function () {
      $this.run();
    });
  },
  run() {
    const $this = this;
    const $form = this.$item;
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda