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:
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;
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.
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?
Hi, firstly great article. And what if we want customize libraries like primeng by adding new properties? What is the best way to do it?
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...
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.
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.
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?
Unfortunately, I don't know a way to do that.
Okey thank you.