In this video, see how to make the code modifications to register an Angular component as an Angular element.
- [Narrator] So now that I have an Angular CLI based project…ready to go, let's turn this into an Angular Elements…project.…And because I'm using Angular CLI,…this is very, very simple.…Now one thing I also did, and this is optional,…I also went ahead and did a git commit because…Angular CLI will instant-cheat a git wrapper for me.…The reason I did this is because I'm going to use…Angular CLI and I'm going to add support for…Angular Elements here and I'm going to run a bunch…of commands and Angular CLI does a bunch of work for me.…
So this git commit here, this green thing you see here,…that'll help me keep a track of what files are changing…in the process of converting this to use Angular Elements.…Converting this to Angular Elements is very simple.…You simply say ng add @angular/elements and hit enter.…And this will go online and with the help of Angular…schematics it might even make some changes to our project.…And at the end of this, you have support for Angular…Elements in your project.…
Really, it's as simple as that.…
Released
12/13/2018- Why out-of-the-box Angular doesn't work well with SPFx
- Architectural approaches
- Creating and running an Angular CLI project
- Converting Angular components to Angular elements
- Building and running Angular elements
- Creating a new SPFx project
- Using Angular elements in SPFx
Share this video
Embed this video
Video: Convert an Angular component to an Angular element