Answer the question
In order to leave comments, you need to log in
How to get Intellisense for vue in template block in VisualStudio?
Hello.
The problem is that when I type the names of typed variables in the template code, visual studio does not list the fields of these types.
For example, here is the component code:
<template>
<div>
<div>{{ foo.a }}</div>
<div v-for="x in bar">{{ x.a }} *** {{ x.b }}</div>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component
export default class TestComponent extends Vue {
foo: myclass = { a: "bar", b: 12 };
bar: Array<myclass> = [{ a: "aaa", b: 1 }, { a: "bbb", b: 2 }, { a: "ccc", b: 3 }]
}
class myclass {
a!: string;
b!: number;
}
</script>
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