javascript 角度样板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17453833/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 08:24:30  来源:igfitidea点击:

Angular Boilerplate

javascriptangularjs

提问by zimt28

There seem to be quite some angular.js boilerplate-kits to get started; angular-seed, some using requirejs and so on, but lots of the ones I found appear to be quite dated. Being new to angular: is there any boilerplate "to go", something hyped everybody uses? I'm looking for a good, proved way to give my app structure.

似乎有相当多的 angular.js 样板套件可以开始使用;angular-seed,一些使用 requirejs 等等,但我发现的很多看起来已经过时了。刚接触 angular:是否有任何样板文件“可以使用”,每个人都使用的大肆宣传的东西?我正在寻找一种好的、经过验证的方法来提供我的应用程序结构。

Things I could find so far include

到目前为止我能找到的东西包括

采纳答案by holographic-principle

There is no one correct way to structure every application. And definitely nothing more mainstream than what you've already found.

没有一种正确的方法可以构建每个应用程序。绝对没有什么比你已经发现的更主流了。

Start from that and work your way towards what's optimal for your current application. I would recommend a simpler structure at first (naturally separate vendor from application files, CSS etc.), then refactoring as you go along.

从那开始,朝着最适合您当前应用程序的方向努力。我会首先推荐一个更简单的结构(自然地将供应商与应用程序文件、CSS 等分开),然后随着你的进行重构。

回答by Will M

I agree with finishingmove, it depends on your project.

我同意finishmove,这取决于你的项目。

I'm a huge fan of ng-boilerplate.

我是ng-boilerplate 的忠实粉丝。

It has an awesome modular structure. I prefer it over to stacks or sock drawer.

它有一个很棒的模块化结构。我更喜欢它而不是堆栈或袜子抽屉。