Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
Cómo configurar Vue.js SPA al iniciarlo en HTML

Tengo una aplicación django donde tengo un área que está hecha en Vue.js. Me gustaría saber si es posible establecer parámetros en el momento de la inicialización de la aplicación Vue.js en HTML. Por ejemplo, un token donde VueApp puede usar para autenticar y obtener algunas API en django.

Hoy en día se está haciendo así:

 <body> <noscript> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> </noscript> <div id="app"></div> <!-- built files will be auto injected --> <script> window.config = {{vue_config | safe}}; </script> <script type="text/javascript" src="{% static 'js/app.js' %}"></script> </body>

Y dentro de VueApp obtengo las configuraciones de window.config

¿Hay una mejor manera de hacer esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!