Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nolros's avatar
Level 23

VueJS Render Static HTML

This seems like an obvious or simple ANSWER, but I cannot seem to find an answer. How do I dynamically import a HTML FILE into a Vue component? NOT a template, but lets say I have an article-.html file that I want to pull in dynamically e.g. on click of post abstract show the above mentioned html file. In Laravel it would @include(‘path’) or AngularJS it would be ng-include(‘path)

0 likes
2 replies
tykus's avatar

Partials are not supported in Vue - this explains why and suggests the "Vue-way"

ewerkema's avatar

Unfortunately, as I understand you cant import static HTML files into your Vue component. You can use Async Components for this purpose and load it from the backend.

Please or to participate in this conversation.