Answer the question
In order to leave comments, you need to log in
Pass variable as parameter to template?
Hello! How to correctly pass a variable to template?
const db =[{one: 1 }];
new Vue({
el: '#app',
template: '<Peoples :db={{ db }}/>',
components: { Peoples }
})
- invalid expression: expected property name, got '{' in
{{
Raw expression: :db="{{"
Answer the question
In order to leave comments, you need to log in
Make it computed, which will take the variable from outside and make it a field of the vue instance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question