步骤1. 设置开发环境

在开始工作之前,我们必须设置好开发环境。

如果你的机器上还没有Node.js®和npm 和VScode(因为我是用VS工具来编辑的), 请先安装它们。

然后全局安装 Angular CLI 。

步骤2. 创建新项目

打开终端窗口。

运行下列命令来生成一个新项目以及应用的骨架代码:

步骤3. 启动开发服务器

进入项目目录,并启动服务器。

ng serve命令会启动开发服务器,监听文件变化,并在修改这些文件时重新构建此应用。

使用--open(或-o)参数可以自动打开浏览器并访问http://localhost:4200/

浏览器中出现的画面:

How to create a angular2 project process的更多相关文章

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:

    问题: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (defau ...

  2. Idea项目:Failed to create a Maven project ‘…pom.xml’ already exists in VFS 解决

    在IDEA里面创建Module,因为项目类型原因删掉,又重新创建一个新的,名字没有变.于是报错: Failed to create a Maven project: '**/***/pom.xml' ...

  3. [lean scala]|How to create a SBT project with Intellij IDEA

    this article show you how to create a SBT project with IDEA. prerequisite: 1.JDK8 2.Scala 2.11.8 3.I ...

  4. idea创建同名的maven工程时报错:Failed to create a Maven project 'xxx/pom.xml' already exists in VFS

    1.说明 原先有个 xxx 的 maven 工程,然后删掉了,又重新建了个同名的工程,而且目录也一样,结果报错: 可以在 Help ==> Show Log in Explorer 查看到以下具 ...

  5. [Python] Create a Django project in Pycharm

    From: http://blog.csdn.net/u013088062/article/details/50158239 From: http://blog.csdn.net/u013088062 ...

  6. [NPM] Create a new project using the npm init <initializer> command

    Historically, the npm init command was solely use to create a new package.json file. However, as of ...

  7. Why does eclipse automatically add appcompat v7 library support whenever I create a new project?

    Best ways to solve these: Firstly in project,Right click->properties->Android.There you can se ...

  8. IDEA MAVEN Failed to create a Maven project 'C:/gitProjects/mayProj/pom.xml' already exists in VFS

    When adding the module to an existing module that already has a POM, it is necessary to manually spe ...

  9. Project Management Process

    Project Management ProcessDescription .............................................................. ...

随机推荐

  1. git在用https进行push时候免输账密的方法

    先新建一个文件 $ touch ~/.git-credentials $ vim ~/.git-credentials 进去添加内容(github为github.com,码云为gitee.com) h ...

  2. [Windows] 如何通过 mount point 找到对应的 VHD 文件

    假设有一个 Virtual Disk(VHD) 文件.已经 online --> attach --> mount. 知道 mount 的文件夹,要找到 .vhd 文件.可以用如下方法: ...

  3. Linux 字符串处理函数

    1 strchr 函数原型:extern char *strchr(char *str,char character) 参数说明:str为一个字符串的指针,character为一个待查找字符.     ...

  4. java中FutureTask的使用

    文章目录 FutureTask简介 Callable和Runnable的转换 以Runnable运行 java中FutureTask的使用 FutureTask简介 FutureTask是java 5 ...

  5. java中wait和sleep的区别

    文章目录 Wait和sleep的区别 唤醒wait和sleep java中wait和sleep的区别 在本篇文章中,我们将会讨论一下java中wait()和sleep()方法的区别.并讨论一下怎么使用 ...

  6. docker容器介绍

                       Docker容器 一.什么是Docker? Docker时Docker.Lnc公司开源的一个基于LXC技术之上搭建的Container容器引擎,源代码托管在Git ...

  7. 记一次痛苦的Django报错调试经历:

    开发的程序在我的本地mac上,ubuntu上,以及树莓派上都成功实现了迁移和运行,但是当准备将运行好好地程序迁移到阿里云的服务器上的mysql数据库上时,出现了非常多的幺蛾子的问题. 具体如下: 初始 ...

  8. 第三方库PyYAML

    建议参考PyYAML Documentation来源:http://pyyaml.org/wiki/PyYAMLDocumentation:http://blog.csdn.net/conquer07 ...

  9. 利用requests, beautifulsoup包爬取股票信息网站

    这是第一次用requests, beautifulsoup实现爬虫,此次爬取的是一个股票信息网站:http://www.gupiaozhishi.net.cn. 实现非常简单,只是为了demo使用的数 ...

  10. 数学--数论--HDU 5223 - GCD

    Describtion In mathematics, the greatest common divisor (gcd) of two or more integers, when at least ...