Are the technical concepts of Angular Elements and Stencil similar?
Angular Elements will be a new feature in Angular 6, where u can basically wrap your written Angular component as a Web Component. In my understanding the generated Custom Element is just a bridge to Angular, so we still have to ship Angular.
Stencil, on the other side, claims to be a compiler that generates Web Components. So the generated Custom Element is not just a bridge to something?
Did i get that right?
You shouldn't have to ship Angular as you put it. Angular Elements will allow us to use Angular components without the whole Angular Ecosystem. So if you had a React app or a VueJS app, you could take your Angular Element (thanks to Custom Element) and just plop it into those apps.
Rob Wormald did a cool talk about them with all the deets at ng-conf this year. I'd check that out for the latest info.
yes you are right, stencil is just a compiler to generate Standard Web Components so you are able to use your web components (built with stencil) everywhere.
You can generate a web component and then use it in your Angular or React or Vue App, just load it and drop the tag and will work.
来源:https://stackoverflow.com/questions/49938504/technical-concepts-of-angular-elements-and-stencil