使Visual Studio代码自动完成属性HTML

发布于 2025-01-29 12:11:14 字数 261 浏览 5 评论 0 原文

我正在研究Visual Studio代码中的Angular项目。有没有一种方法可以使Visual Studio代码自整台上我的模型的属性?

的员工模型

这是我想要从图片2

是否有人知道如何启用这一点,是有扩展名之类的东西吗?

I'm working on an Angular project in Visual Studio Code. Is there a way to make visual studio code autcomplete the properties of my model?

This is the employee model that I want the autocompletion from picture 1

But when I'm typing I don't see the correct completions picture 2

Is there anyone who know how to enable this, is there a extension or something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

像你 2025-02-05 12:11:14

在您的打字稿类中,您应该定义员工数组的类型:

employees : Array<Employee> 

On your typescript class You should define the type of employees array:

employees : Array<Employee> 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文