简体   繁体   English

在AngularJS中的多个项目之间共享代码

[英]Sharing code across multiple projects in AngularJS

Firstly, I am new to AngularJS. 首先,我是AngularJS的新手。 I was wondering what are the best practices around sharing common javascript code across multiple AngularJS projects? 我想知道围绕多个AngularJS项目共享通用javascript代码的最佳实践是什么?

What do the experienced AngularJS ninjas do out there? 有经验的AngularJS忍者在那里做什么?

I have heard of bower. 我听说过凉亭。

By creating independent modules that you will then inject wherever you need to use those features. 通过创建独立的模块 ,您将在需要使用这些功能的任何地方注入它们。 (you will have to include the .js files too) (您也必须包含.js文件)

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

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