简体   繁体   English

不带npm Visual Studio 2015的d.ts文件的Angular2.JS文件

[英]Angular2.JS files with d.ts files WITHOUT npm Visual Studio 2015

Does anyone know of a recent blog post or tutorial on which angular 2 .js files along with the appropriate d.ts files I need so I can just drop them into an existing VS solution without using NPM? 有谁知道最近的博客文章或教程,其中介绍了我需要哪些angular 2 .js文件以及相应的d.ts文件,以便无需使用NPM就可以将它们放入现有的VS解决方案中? I see that I can get the angular files here , but not sure which ones I need. 我看到我可以在此处获取角度文件,但不确定我需要哪些文件。 According to the Angular docs, I need do nothing to get typings files for library packages that include d.ts files—as all Angular packages do. 根据Angular文档, 与所有Angular软件包一样 ,我不需要采取任何措施来为包含d.ts文件的库软件包获取打字文件。 , but again, when I look thru a sample Angular app, don't know which d.ts files I need. ,但是,当我浏览一个示例Angular应用程序时,却不知道我需要哪些d.ts文件。

I can't stand bloat and clutter. 我受不了膨胀和混乱。 Below is a brand new asp.net core on .net 4.6 on the left, the same thing on the right after following this blog : 以下是左侧的.net 4.6上全新的asp.net核心,在关注此博客后,右侧的内容相同:

荒唐的膨胀和混乱!

I can't stomache having to add over 13,000 files to get ahold of maybe 20?, 30? 我无法忍受必须添加超过13,000个文件才能获得大约20?,30? files. 文件。

Maybe I'm being too OCD about this, but right now I'll take any suggestions to avoid that bloat, even going with another front-end framework. 也许我对此过于强迫症,但现在我会采取任何建议来避免这种膨胀,即使是使用另一个前端框架也是如此。 I've briefly looked at Aurelia, which I like, but again, NPM. 我简短地看了一下Aurelia,我很喜欢,但同样,NPM。 Not sure React is appropriate. 不确定React是否合适。

My business domain includes Category , which is a self-referencing class/table, and I'm after an intuitive UI where the user can quickly create their own Category structure without having to do a bunch of post-backs to the server. 我的业务领域包括Category ,它是一个自引用的类/表,并且在一个直观的UI之后,用户可以快速创建自己的Category结构,而不必进行大量的回发到服务器的操作。 Seems with either Angular2 or Aurelia, I'd only need a couple of Component s to accomplish this in the browser. 似乎使用Angular2或Aurelia,我只需要几个Component即可在浏览器中完成此操作。

I know Angular 1.5 added Component s, and I may explore that if need be. 我知道Angular 1.5添加了Component ,如果需要的话,我可能会探索。 From what I understand about React, it's not for data management. 根据我对React的了解,它不是用于数据管理的。

So to reiterate my questions, can I get just the Angular2 files along with their d.ts files so I can code in typescript? 因此,重申我的问题,我是否可以只将Angular2文件及其d.ts文件一起获得,以便我可以在打字稿中进行编码? If not, the same question for Aurelia. 如果没有,对奥雷利亚也有同样的问题。 And if not, any way that I can keep bloat down yet still write some elegant front-end code. 如果没有,那么我可以保持低调的任何方式仍然编写一些优雅的前端代码。

Any help will be appreciated 任何帮助将不胜感激

Ok so for Development purposes yes your Angular 2 stuff will be massive (its annoying but necissary) however as I am sure you know, once you build your angular app for production (using angular cli for example) it cuts all those 40,000 files down to about 10. for example this is my application before and after production... 好了,出于开发目的,是的,您的Angular 2内容将非常庞大(烦人但必不可少),但是,正如我确定的那样,一旦您构建了用于生产的角度应用程序(例如,使用angular cli),它将把所有40,000个文件缩减为大约是10。例如,这是我在生产前后的应用程序...

在此处输入图片说明

and after 之后

在此处输入图片说明

So I would guess you want to build your angular stuff out first and then drop it in you application 因此,我想您想先构建角度组件,然后将其放入应用程序中

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

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