哪个更好的Angular安装方式 [英] which better way Angular install

查看:75
本文介绍了哪个更好的Angular安装方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是angular的新手,我知道如何用angular cli安装angular,我也可以包括angular,只需将angular js链接到脚本标签即可.开始工作,那我为什么要使用npm angular cli来安装太多模块,这使我的角度变得简单,为什么使它变得如此复杂呢?如果我只能以简单的方式使用它,因为我不知道很多节点模块,也无法在不知道我实际使用这些模块的情况下跳过它.请不要使其变得复杂,我只想简单干净的答案,谢谢提前

I am new in angular, I know how to install angular with angular cli, also i can include angular with just give angular js link to script tag,My question is that if i can just use script tag to link angular js and start working then why should i use npm angular cli which install too many module, that confusing me simplicity of angular, why make it so complex ? if i can only use it in simple way, because i dont know that lots of node module also i can not skip that without knowing what i am actually using these module..Please dont make it complex i just want simple and clean answer,Thanks in advance

推荐答案

AngularJS不是Angular.

简单地说,AngularJS是AngularJS的任何版本,最高可达〜1.6.X.通过使用script标签,将AngularJS包含在项目中.

Simply put, AngularJS is any version of AngularJS up to ~1.6.X. You include AngularJS in your project by using the script tag, as you put it.

Angular 2到Angular 4的Angular完全不同.它不是将其包含在您的项目中,而是设计为它自己的项目.它包括Angular CLI,这是迄今为止搭建项目的最快方法.由于此方法是一个功能完整的项目/单页应用程序(SPA),因此将具有依赖性.如果要从头开始,并且具有尽可能少的依赖性,请使用命令ng new my-app --minimal.

Angular which is Angular 2 through Angular 4 is completely different. Instead of including it in your project, it is designed to be it's own project. It includes the Angular CLI which is by far the fastest way to scaffold your project. Since this method is an entire fully functioning project/Single Page Application(SPA), it's going to have dependencies. If you want to start from scratch, and with as few dependencies as possible, use the command ng new my-app --minimal.

我希望这个澄清对您有帮助!

I hope this clarification helps you!

这篇关于哪个更好的Angular安装方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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