Answer the question
In order to leave comments, you need to log in
Starting data for a Vue application - how to arrange?
There is an ID that can be added to the HTML code at the time of rendering by the framework.
You want to pass this ID to an application written in Vue.
1. As an example, this can be done through an attribute.
<div
id="app"
test-id="<?php echo $test->id ?>">
</div>
beforeMount: function () {
this.testId = this.$el.attributes['test-id'].value;
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question