Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Cds Angular Component Imports #6278

Locked Answered by gnomeontherun
siddharth1903 asked this question in Q&A
Discussion options

You must be logged in to vote

The basic question of using CdsModule or not depends on if you want to get the compiler guarantees that come with our Angular wrappers. If you import the web components directly, Angular doesn't know their binding options and so you have to basically disable template checking when using CUSTOM_ELEMENTS_SCHEMA. I believe this is worse than a few kb extra to include CdsModule, but it is a tradeoff. CdsModule also is tree shakeable, so if you don't use a component Angular CLI will drop it from the bundle. CdsModule (and all of the individual subcomponents) handle registering the icons used by these components as well, which again helps the developer experience.

If you want full control over …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@siddharth1903
Comment options

@gnomeontherun
Comment options

@siddharth1903
Comment options

Answer selected by mathisscott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type: support Support, implementation or questions @cds/angular
3 participants