步骤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. VirtualBox 原始镜像转换成 vdi 镜像

    VBoxManage convertdd [-static] <filename> <outputfile> 将raw硬盘转换成vdi虚拟硬盘

  2. 鸟哥Linux私房菜(基础篇)——第五章:首次登入与在线求助 man page笔记

    1.X Winsows与文本模式的切换 ●[Ctrl] + [Alt] + [F1] ~ [F6] :文字接口登入 tty1 ~ tty6 终端机.        ●[Ctrl] + [Alt] + ...

  3. java中CompletionService的使用

    java中CompletionService的使用 之前的文章中我们讲到了ExecutorService,通过ExecutorService我们可以提交一个个的task,并且返回Future,然后通过 ...

  4. 【linux题目】第一关

    详细的解答:https://github.com/Zoe233/Linux/blob/master/[题目]5.Linux了解程度测试题解析.ipynb 1. 创建一个目录/data 解答: mkdi ...

  5. ASP.NET Core 找不到 npm指令异常

    1.错误再现 利用VS2019预览版创建ASP.NET Core 的单页面Web程序 创建后直接运行,出现如下错误 Ensure that 'npm' is installed and can be ...

  6. Radware:上周五美国大规模DDoS攻击是如何发生的

    10月21日上午,Dyn遭受到拒绝服务(DoS)攻击,造成了托管DNS网络的中断.成千上万的网站因此变得不可访问,其中包括Amazon EC2.当天晚些时候,当攻击者发起第二轮针对Dyn DNS系统的 ...

  7. Openstack HA集群5-Keystone HA

    # yum install -y openstack-keystone httpd mod_wsgi # mysql -u root -p -e "CREATE DATABASE keyst ...

  8. Codeforces Round #618 (Div. 2)-B. Assigning to Classes

    Reminder: the median of the array [a1,a2,-,a2k+1] of odd number of elements is defined as follows: l ...

  9. codeforce 227D Naughty Stone Piles (贪心+递归+递推)

    Description There are n piles of stones of sizes a1, a2, -, an lying on the table in front of you. D ...

  10. JavaScript toFixed() 实现四舍五入保留两位小数

    const num = 18.186; let result; result = num.toFixed(2) console.log(result) // 18.19 注意,返回值为String类型