DEV Community

Discussion on: My favorite Angular libraries to use in any project

Collapse
 
frostqui profile image
Diego López

Normally this type of libraries have a variable @Input to pass from outside of the component certain customizations. If you want to create new theme take a look at this article:

medium.com/@OlegVaraksin/simple-wa...

Collapse
 
cuneytdalan profile image
cuneytdalan • Edited

I actually would like to create my own components by extending the components' class of primeng. Generate my custom component with different selector name but with same properties?
eg. primeng has a component named "p-table"

p-table [value]="value" p-table

I would like to create component with same properties of p-table;

my-custom-component [value]="value" my-custom-component

What do you think about that?

By the way thank you for your answer.

Thread Thread
 
frostqui profile image
Diego López

Maybe you can use the inheritance of Angular components, although I don't know if you can inherit from component libraries.

Another option is create your component with the same properties as those of the library. Inside your component you call the component of the library with the same parameters.

Thread Thread
 
cuneytdalan profile image
cuneytdalan • Edited

I can extend the functions of the component but i cannot accually extend the template of it. Is there any way that you know to use the template of the primeng component's template?

Thread Thread
 
frostqui profile image
Diego López

Unfortunately, I don't know a way to do that.

Thread Thread
 
cuneytdalan profile image
cuneytdalan

Okey thank you.