2

I have a table which the user is supposed to dynamically make changes in, this includes adding new rows and columns. I have tried doing this using document.createElement, however when you do this the styling doesn't carry over.

Is there a way other than document.createElement you use in angular?

Any help is appreciated.

Linus
  • 53
  • 2
  • can elaborate more like what you want ? you want to render dynamic components in Rows and columns. – Sunny Goel Jul 14 '20 at 07:48
  • depends on your needs, but for basic stuff you can either use *ngIf to create/remove content based on your needs. or use [class] to hide/show content. – toskv Jul 14 '20 at 07:48
  • I basically want the user to be able to alter a table by adding an undefined amount of new columns and rows, between, after, and before existing ones. I've gotten this to work with document.createElement, but the issue is that the styling isn't carried over to these dynamically generated elements – Linus Jul 14 '20 at 07:53
  • can you provide a minimal example of what you have right now? – toskv Jul 14 '20 at 08:45
  • if styling isn't applied that's usually caused by missing css, the way the content is created doesn't really matter. – toskv Jul 14 '20 at 08:46

0 Answers0