In this video, the instructor describes the three possible choices of using Angular with SPFx.
- [Instructor] So we won't use Angular with SharePoint framework. It isn't an insurmountable problem, and with proper architecture and some very clever code, we can get around these problems. So there are three, distinct architectural approaches that I'd like to present to you. The first approach is that we're going to have a single project without Angular CLI. I think you can pretty much guess what I feel about this approach, that you're giving up Angular CLI, so I'm not going to like this approach, but let's discuss this for the sake of completion anyway, because if you Google or Bing around for how to use Angular with SPFx, you will find code examples on the Internet by other people that have been pushing this approach.
I'm not a fan of this approach, and I'll explain my reasons in a moment. How about using a single project with Angular CLI? Let's see, will that approach work? Let me discuss through that. And then finally, why not just have two separate projects, one that is a pure SPFx project, and second that is a pure Angular CLI project? Can they coexist somehow while keeping your, say, source control life and sanity, so to say? Now, for the sake of time, I will only discuss these three approaches, and I will narrow down on the one approach I like the most, and will discuss in code only the approach that I like the most.
Approaches that I don't like, what's the point of discussing them, right? So I will explain my reasons why I don't like those approaches, and one of these three approaches we'll dive deeper into.
- 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