网络与角度cli [英] dotnet vs angular cli

查看:83
本文介绍了网络与角度cli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读许多Angular 2/4教程,以期希望获得足够的信心来致力于构建项目.他们中的大多数人都使用Angular cli来生成入门模板.

几天前,我偶然发现了一个演讲,讲解了使用dotnet cli的.NET Core Angular模板.由于我的大部分部署都生活在Azure中,因此我欢迎使用Microsoft准备的模板的想法.

这两个入门站点都可以工作,但是生成的文件非常不同.我知道实际的Angular应用程序将位于ClientApp(dotnet)或src(ng)文件夹中,并且可以从一种环境移动到另一种环境,但是我希望坚持将要发布/生产的解决方案.

我的问题是:使用cli比使用另一cli有什么优势吗? dotnet具有和ng没有的任何高级功能吗?在Azure上部署时,dotnet生成的站点的性能是否会比ng站点好?

PS.我设法将dotnet模板更新为Angular4.我需要这样做,以便可以将购买的管理模板连接到入门站点(它们使用v4).但是,并不是所有的样式/行为都能按原样解析. Angular CLI的不同故事-集成现成的管理模板更加容易.这是决定性因素吗?

预先感谢.

I have been going through many Angular 2/4 tutorials in hopes to gather enough confidence to commit to building a project. Most of them use Angular cli to generate a starter template.

Just a few days ago I stumbled on a lecture explaining .NET Core Angular templates using dotnet cli. Since most of my deployment lives in Azure, I welcomed the idea of using the templates prepared by Microsoft.

Both starter sites work, but the files generated are very different. I understand that the actual Angular app will live in ClientApp (dotnet) or src (ng) folders and can be moved from one environment to another, but I would like to adhere to a solution that will be publish/production ready.

My questions are: are there any advantages using one cli over another? Are there any advanced features that dotnet has and ng doesn't? Will dotnet generated site perform better than ng site when deployed on Azure?

PS. I managed to update dotnet templates to Angular 4. I needed to do that so I could wire up purchased admin templates to the starter site (they use v4). However, not all the styles/behavior resolve as they should. Different story with Angular cli - integrating the ready admin templates is easier. Could that be a decisive factor?

Thanks in advance.

推荐答案

使用Visual Studio和Angular模板创建Angular应用程序很困难.我尝试了一下,将其插拔了好几天,最后转而使用Angular CLI.

Using Visual Studio and the Angular templates to create an Angular app is hard. I tried it, plugged away at it for days, and ended up moving to Angular CLI.

"hello world"东西可以通过Visual Studio正常运行,但是当您尝试变得更复杂时,它很快就会开始崩溃.尝试调试错误等非常困难,第三方模块无法正常工作...

The "hello world" stuff works OK through Visual Studio but when you try to get a bit more sophisticated it soon starts falling down. Trying to debug errors etc is hard, 3rd party modules dont work properly...

我强烈建议您使用Angular CLI,命令提示符,VS Code和Chrome调试器来开发您的前端.保持Visual Studio在当今的优势:构建.Net Core后端.如果您不必从每个问题中消除Visual Studio,您还将发现Angular社区可以更轻松地为您提供帮助.

I would highly recommend using Angular CLI, command prompt, VS Code and Chrome debugger to develop your front-end. Keep Visual Studio for what its good at these days: building your .Net Core back-end. You will also find the Angular community can help you a lot more readily if they don't have to elimintate Visual Studio from every problem.

对于您考虑的两种选择产生的结果网站,其价值大致相同.毕竟,它们几乎是相同的源代码和要比较的相同的编译器.

For what its worth the resulting websites produced by both options you are considering would perform roughly the same. After all its pretty much the same source code and the same compilers you are comparing.

这篇关于网络与角度cli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆