// 显示当前node和npm版本 $ node -v $ npm -v // node 版本高于6.9.3 npm版本高于3.0.0
$ npm install -g typescript // 新建项目的时候会自动安装typescript(非全局)所以这里也可以不用安装。
$ npm install -g @angular/cli
$ ng v
// 出现下面画面说明安装成功,如果不成功你可能需要uninstall一下,再重新来过
$ ng v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.1.1
node: 7.10.0
os: darwin x64
$ ng new my-app
$ ng new helloKeriy installing ng create .editorconfig create README.md create src/app/app.component.css // 使用HTML模板、CSS样式和单元测试定义AppComponent组件。 它是根组件,随着应用的成长它会成为一棵组件树的根节点。 create src/app/app.component.html create src/app/app.component.spec.ts create src/app/app.component.ts // 定义AppModule,这个根模块会告诉Angular如何组装该应用 create src/app/app.module.ts create src/assets/.gitkeep // 这个文件夹下你可以放图片等任何东西,在构建应用时,它们全都会拷贝到发布包中。 create src/environments/environment.prod.ts create src/environments/environment.ts create src/favicon.ico // 每个网站都希望自己在书签栏中能好看一点。 请把它换成你自己的图标。 create src/index.html // 宿主页面 create src/main.ts create src/polyfills.ts create src/styles.css // 公共样式 create src/test.ts // 这是单元测试的主要入口点 create src/tsconfig.app.json create src/tsconfig.spec.json create src/typings.d.ts create .angular-cli.json // Anguar 编译依赖 create e2e/app.e2e-spec.ts // e2e 端对端测试目录 create e2e/app.po.ts create e2e/tsconfig.e2e.json create .gitignore create karma.conf.js create package.json // Angular 的依赖包 create protractor.conf.js create tsconfig.json // TypeScript 编译器的参数 create tslint.json Successfully initialized git. Installing packages for tooling via npm. Installed packages for tooling via npm. Project 'helloKeriy' successfully created.
$ ng new helloKeriy --skip-install // 先跳过npm安装 $ cd helloKeriy $ cnpm install // 使用淘宝源安装
cd helloKeriy ng serve -open
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有