Tuesday, November 28, 2017

Angular, prevent component html tag

Problem: 
Angular components each create their own custom tag in the HTML structure. This can prevent HTML tables from aligning correctly if a custom component element gets placed encapsulating table row elements inside a table element.

Solution: 

Use an attribute selector.

@Component({ selector: 'my-component',

Source(s):
https://stackoverflow.com/questions/34588933/how-to-remove-replace-the-angular2-components-selector-tag-from-html

No comments:

Post a Comment