课程: Angular Essential Training

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Angular standalone components

Angular standalone components

- [Instructor] As of Angular version 14 you can use something called standalone components which lets you use files in your project without assigning them to a module. As of this recording, standalone components are still new and most existing projects will likely use modules to organize their code but standalone components are a powerful tool that make your code simpler and easier to work with. All angular developers should know how to use standalone components. I opened our project here in a GitHub code space. I talked about why we use code spaces earlier in this course, so for now, just think of them as an easy way to share and write code without installing anything on your local machine. Let's take a look at some code. I'll go to the source folder. Open the app folder, components, high scores, and click on high scores.component.TS to open the file. To mark any component, pipe, or directive as standalone, Add the…

内容