#How to use web components in standalone?

3 messages · Page 1 of 1 (latest)

neon depot
#

I've seen some examples using ngmodule by having something like

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})

and then, if you want, you can 'wrap all your Web Components with Angular Components and declare those Angular Components in their own module using CUSTOM_ELEMENTS_SCHEMA. Then, import that wrapper module into your application that dont use CUSTOM_ELEMENTS_SCHEMA.' (from a blog i saw)

but is there a proper way import and use web components in standalone components in angular 17 that don't use ngmodule? and be able to use the npm web components at only the components i wish to use them on?

meager furnace
#

You can just use the schema in the component

#

Doesn't have to be in a module