简体   繁体   English

Angular 原理图与库

[英]Angular Schematics vs Library

I'm starting a project with friends, which is based on angular.我正在和朋友开始一个项目,它基于 angular。 We are not sure whats the correct way to provide functionalities which are common in some repositories.我们不确定提供某些存储库中常见的功能的正确方法是什么。

Is it common to use code generation (schematics) to provide components with template and typescript codes) or is it common to use libraries?使用代码生成(原理图)为组件提供模板和 typescript 代码是否很常见)还是使用库很常见?

Thanks in Advance!提前致谢!

Sharing code (ie components, services, pipes, etc) are typically done with libraries .共享代码(即组件、服务、管道等)通常由完成。 Schematics are generally used when you, for example, want to automate steps that a user normally would have to do manually in order to use your library.例如,当您想要自动化用户通常必须手动执行以使用您的库的步骤时,通常会使用原理图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM