Angular 2 allows to write multi-line templates by using ` characters to enquote them. It is also possible to put multi-line template into .html file and referen
In terms of how the final application will perform, there's no real difference between having an embedded template and an external template.
For the developer, however, there are a number of differences that you have to consider.
.html file. (IntelliJ IDEA, at least, supports HTML for inline templates and strings)These two things will be of equal value for many people, so you'd just pick your favorite and move ahead with life if this were all there was to it.
But that leads us to the reasons you should keep your templates in your components, in my opinion:
/where/is/my/template type references from the root that change depending on how deep your component is.That's why I would suggest that you keep your templates inside your components where they are easily found. Also, if you find that your inline template is getting large and unwieldy, then it is probably a sign that you should be breaking your component down into several smaller components, anyway.