网址:https://angular.io/guide/schematics

A schematic is a template-based code generator that supports complex logic.

一个 Schematic 是一个基于模板的代码生成器,能支持复杂逻辑。

It is a set of instructions for transforming a software project by generating or modifying code.

Schematics 是一套指令的集合,能够通过生成或者更改代码的方式,对一个软件项目进行处理。

Schematics are packaged into collections and installed with npm.

Schematics 以 collections 的形式打包,通过 npm 安装。

Collection: In Angular, a set of related schematics collected in an npm package.

Collection 是 Angular Schematics 特有的概念,一套 Schematics 打包成 npm package.

The schematic collection can be a powerful tool for creating, modifying, and maintaining any software project, but is particularly useful for customizing Angular projects to suit the particular needs of your own organization.

Schematics 是一种功能强大的工具,能创建,更改和维护软件项目,但是在定制化 Angular 项目,以满足组织特殊需求的这个领域里显得格外有用。

You might use schematics, for example, to generate commonly-used UI patterns or specific components, using predefined templates or layouts.

比如我们可以使用 Schematics,根据预定义的模板或者布局信息,生成能够普遍使用的 UI patterns,或者特别的 Components.

You can use schematics to enforce architectural rules and conventions, making your projects consistent and inter-operative.

可以使用 Schematics 来强化架构规则和规范,让项目标准更加一致。

Schematics for the Angular CLI

Schematics 是 Angular 生态圈的一部分。

The Angular CLI uses schematics to apply transforms to a web-app project.

Angular CLI 使用 Schematics 来对 web app 项目施加更改。

You can modify these schematics, and define new ones to do things like update your code to fix breaking changes in a dependency, for example, or to add a new configuration option or framework to an existing project.

Schematics that are included in the @schematics/angular collection are run by default by the commands ng generate and ng add.

@schematics/angular 下面的 Schematics 默认被 ng generate 和 ng add 使用。

The package contains named schematics that configure the options that are available to the CLI for ng generate sub-commands, such as ng generate component and ng generate service.

这个包内包含了命名的 Schematics,能够为 ng generate 等命令行提供配置 options.

在 schematics\angular\collection.json 文件里能看到 ng generate 命令所能生成的各种 Angular 元素:

看个例子:

更多Jerry的原创文章,尽在:“汪子熙”:

Angular Schematics 学习笔记相关推荐

  1. Angular 4 学习笔记1

    文章目录 一张图说明Angular程序架构 Angular开发环境搭建 项目文件夹和各部分关系 引入npm命令安装的外部模板 使用指令生成组件 启动项目指令 数据绑定 将css类绑定到html标签上 ...

  2. Angular入门学习笔记

    Angualr入门扫盲必备 声明:这篇是我学习angualr的笔记,可以转载,但必须注明来源作者 kone 并附上本文链接 A:环境,工具 1:先确保安装了nodejs和npm Nodejs npm ...

  3. Angular 4 学习笔记 从入门到实战 打造在线竞拍网站 基础知识 快速入门 个人感悟

    最近搞到手了一部Angular4的视频教程,这几天正好有时间变学了一下,可以用来做一些前后端分离的网站,也可以直接去打包web app. 先上个效果图: 环境&版本信息声明 运行ng -v @ ...

  4. 为什么选择angular?-学习笔记

    使用angular的原因: Angular是一款优秀的前端JS框架,已经被用于Google的多款产品当中. 它有一下的特性: 良好的应用程序结构: 双向数据绑定: 指令: HTML模版: 可嵌入,注入 ...

  5. 3、Angular JS 学习笔记 – Controllers [翻译中]

    2019独角兽企业重金招聘Python工程师标准>>> 理解控制器 在Angular中,一个控制器是一个javascript构造函数用于填充Angular作用域. 当一个控制器通过使 ...

  6. 4、Angular JS 学习笔记 – 创建自定义指令 [翻译中]

    2019独角兽企业重金招聘Python工程师标准>>> 创建自定义指令 注意:本指南是针对已经熟悉AngularJS基础的开发者.如果您只是想要开始,建议您先去看教程.如果你在寻找指 ...

  7. Angular Universal 学习笔记

    如果配置得当,我们可以将所有的内容都在服务器端渲染,避免在浏览器端再次调用 API. 首先命令行安装 Angular Universal: ng add @nguniversal/express-en ...

  8. Angular library 学习笔记

    原文 Use cases for Angular libraries Angular 库有 2 个常见用例: 构建可重用的组件库以在应用程序之间共享. 构建共享服务层功能 - 例如. 用于处理外部数据 ...

  9. Angular Universal 学习笔记 - 客户端渲染和服务器端渲染的区别

    https://github.com/angular/universal Universal 的命名由来: We believe that using the word "universal ...

最新文章

  1. 100G 最新技术学习资料大全分享 (2020 年最新)
  2. office2003/2007/2010如何卸载干净
  3. OpenCV中使用神经网络 CvANN_MLP
  4. Python 工具链让你写的代码更规范
  5. 组策略应用之一:映射网络驱动器
  6. Asp.Net Core使用Skywalking实现分布式链路追踪
  7. 我是大道至简山寨版~
  8. 6.Python学习笔记:[enumerate元素加序号;isdigit()像数字;len()计算长度]
  9. 你不知道的JS之作用域和闭包(三)函数 vs. 块级作用域
  10. java做一个简单的银行账户演示程序_JAVA初学(七):银行账户演示程序
  11. 做Data Mining,其实大部分时间都花在清洗数据
  12. 图像分割评估指标——表面距离计算库
  13. matlab教程课后答案肖汉光,MATLAB大学教程
  14. 伍斯特理工学院计算机硕士怎么样,伍斯特理工学院硕士怎么样?
  15. 快点来学吧!9次Android面试经验总结,已开源
  16. 26、流程引擎API
  17. vue3项目打包优化三步走
  18. 帧缓冲区对象 FBO
  19. 又一所新大学将落户广东省!
  20. 微信小程序使用canvas画图并保存到手机相册踩坑总结

热门文章

  1. 计算机网络原理笔记-简单邮件传输协议
  2. xampp中apache不能启动解决方法 (share)
  3. iOS之设置用户头像的圆角
  4. 读jQuery源码释疑笔记
  5. abap中的弹出窗体函数
  6. centos mysql 新增用户
  7. 中国自古以来经历了三种官员选拔制度
  8. 又一次回到追寻梦想的地方
  9. bitnami-redmine Apache服务启动不起来
  10. SpringBoot学习(二)探究Springboot启动机制