简体   繁体   English

Angular HTML 中的 2+ 组件文档预览

[英]Angular 2+ component documentation preview in HTML

I am wondering if it is possible to write documentation for angular components that will be displayed as a tooltip when adding a new component in HTML.我想知道是否可以为 angular 组件编写文档,在 HTML 中添加新组件时将显示为工具提示。 I am using Webstorm.我正在使用网络风暴。

I mean:我是说:

If I have component A如果我有组件 A


/**
 * This is the documentation intended to be shown in the tooltip.
 */
@Component({
  selector: 'app-a',
  templateUrl: './a.html',
  styleUrls: ['./a.scss']
})
export class AComponent {
  constructor() { }
}

In the HTML of the component B在组件 B 的 HTML

  <app-a></app-a>

I expect to see the doc of the component by hovering or using the show documentation shortcut of my IDE.我希望通过悬停或使用我的 IDE 的显示文档快捷方式来查看组件的文档。

(my result) (我的结果)

(result expected) (预期结果)

There is no such feature in the IDE; IDE 中没有这样的功能; we plan to add it in one of the nearest IDE updates, the progress can be tracked at WEB-43480我们计划将其添加到最近的 IDE 更新之一中,可以在WEB-43480跟踪进度

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM