2

All arranged, everything was fine until it became necessary to create a component which is TR.And when inserting that component onto the page Angular2 does the following:

<my-component>
  <tr>...</tr>
</my-component>

It all falls down and bleeds. How can I make it not do that? Where to look? Thanks in advance.

Bohdan Kontsedal
  • 111
  • 3
  • 12
  • Possible duplicate of [Angular 2 + Semantic UI , component encapsulation breaks style](http://stackoverflow.com/questions/34707029/angular-2-semantic-ui-component-encapsulation-breaks-style) – Günter Zöchbauer Mar 29 '16 at 13:57

1 Answers1

1

In fact there is no more support for the "replace: true" feature of Angular1.

You could leverage an attribute in the selector to attach the component:

@Component({
  selector: '[my-component]'
  (...)
})

and use it this way:

<div my-component>
  <tr>...</tr>
</div>
Thierry Templier
  • 198,364
  • 44
  • 396
  • 360