Template html and template string in web components
问题 Is it better to use html template (and then html import) to create web components or to use template string? What are pros and cons of these methods? 回答1: Using html template files is better for reuse: the same file can be used in different web components. Also they are better displayed in most IDEs as they are recognized as full HTML code. Using template strings is faster (inline). They don't rely on HTML Imports which is not adopted by every browser vendors. Also you can use template