Hi All, this isn’t really an nx question per se, but i created an angular element component from a project in my nx workspace, which is displaying fine when I load it in another html project, the problem is, I can’t seem to render an instance of the same element more than once. For example:
<my-custom-element></my-custom-element> <-- renders on the page
<my-custom-element></my-custom-element> <-- does not render on page
I’ve created elements before with success, but this is the first time I’m trying to render the same element multiple times. Has anyone experienced this before?
any errors in the console?
No sir, no errors in the console
any errors when ng serving?
try building the app and see if TS complains
No errors when serving either
I have a few other things i can try, i’ll report back
cool keep me posted
Hey Alex, it looks like it’s a configuration issue. I just plugged in a different element of mine and it works fine so I’m going to do some digging around. I’ll definitely keep you posted.
Thanks for your help!
glad you’re figuring it out!
I figured it out. Not sure how I didn’t notice this the first time around but in my element module.ts file, I had
bootstrap: [MyCustomElement] . I removed that entire boostrap property and voila! Thanks for talking me off the ledge.