新特性速览
Angular CLI 13 🛠️
新增ng generate
命令支持@ngneat/until-activated
插件,提升路由懒加载效率组件通信优化 📡
支持EventEmitter
与@Output()
的类型安全绑定模块化升级 📦
@NgModule
元数据支持providers
按需注入,减少 bundle 大小
开发技巧
- 使用
standalone
模式创建组件ng generate component my-component --standalone
- 配置 TypeScript 严格模式
修改tsconfig.json
中strict
选项为true
- 集成第三方库示例
npm install @ngneat/until-activated