From the course: SharePoint Framework for Developers: 5 SPFx and Angular

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Code changes: Use Angular elements in SPFx

Code changes: Use Angular elements in SPFx

From the course: SharePoint Framework for Developers: 5 SPFx and Angular

Start my 1-month free trial

Code changes: Use Angular elements in SPFx

- [Instructor] So next let's start the process of converting my spfxvanilla project, which is just a simple, out of the box, Hello World web part. So I'm going to convert this to use Angular elements. Here's how we go by doing that. Go to your package.json and here, under dependencies, choose to add a dependency on Angular elements. Notice that I'm not adding a reference to say Angular code or anything like that. I'm just adding a reference to Angular elements only. And even this is optional, so if you want zero dependency on Angular, that is also possible, but you'll see that by adding a dependency to Angular elements, it makes some things a little bit easier for us. So, let's go on and take that dependency. So, because we added this, let's go into that folder and here let's go edit run and npm install. Now let's come back here. Now the intent here, as you know, is that the output of ngElementsVanilla, we want to be able to use that output in spfxvanilla project. How do we go by…

Contents