For a project I need to provide my code as a web component
.
I read that you can configure Angular to generate web components. Plain and simple question: How can that be done?
Asked
Active
Viewed 968 times
2

Lukas
- 9,752
- 15
- 76
- 120
-
do you want to use webcomponent in angular component template? – Max Koretskyi Jul 10 '17 at 14:18
-
A webcomponent is a class with an `@Component` annotation. That's all – Poul Kruijt Jul 10 '17 at 14:18
-
@Maximus no I want to create a web component with Angular – Lukas Jul 10 '17 at 14:19
-
to be used outside Angular? if yes, you can't. Angular is not a framework for creating a web component. Take a look at polymer – Max Koretskyi Jul 10 '17 at 14:20
-
@PierreDuc Do you have an example? It seems using `@Component` is the normal way to create angular components but how would that create a web component? – Lukas Jul 10 '17 at 14:21
-
@Maximus are you sure? The Medium post says so – Lukas Jul 10 '17 at 14:22
-
Yes yes, what I was trying to say is that with the `@Component` you can create a web component which can only be used within angular. Take a look at this answer https://stackoverflow.com/questions/40226449/does-angular2-use-web-components – Poul Kruijt Jul 10 '17 at 14:27