Angular CLI终极参考指南-运行

智码追光说
• 阅读 2551

运行项目

想在浏览器中查看项目,可以跳转到相应目录

$ cd my-app

运行

$ ng serve

在为4200端口上启动开发服务

** NG Live Development Server is running on http://localhost:4200. **
3935ms building modules
Hash: fd7ad6cf3503757e22e0
Version: webpack 2.1.0-beta.25
Time: 6526ms
            Asset       Size  Chunks             Chunk Names
   main.bundle.js    2.78 MB    0, 2  [emitted]  main
 styles.bundle.js    10.2 kB    1, 2  [emitted]  styles
        inline.js    5.53 kB       2  [emitted]  inline
         main.map    2.86 MB    0, 2  [emitted]  main
       styles.map    14.1 kB    1, 2  [emitted]  styles
       inline.map    5.59 kB       2  [emitted]  inline
       index.html  472 bytes          [emitted]
assets/.npmignore    0 bytes          [emitted]
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  2.81 kB       0
webpack: bundle is now VALID.

现在你可以在浏览器上输入http://localhost:4200/ 来访问你的项目
Angular CLI终极参考指南-运行
启动过程中做了这些事情:

  1. Angular CLI从angular-cli.json加载依赖
  2. Angular CLI运行webpack来构建所有js与css代码
  3. Angular CLI启动webpack dev server 在localhost:4200上浏览页面

注意:在执行完第三步以后,ng serve命令不会退出,并输出执行情况
与此同时,由于该进程有LiveReload的支持,TA会动态监听src目录下文件的更改,当发现有文件更新,重新运行第二步,并自动刷新浏览器
要停止此进程返回命令行,可以输入ctrl+c

点赞
收藏
评论区
推荐文章
Easter79 Easter79
4年前
svg自适应写法
svg自适应写法<pre<!DOCTYPEhtml<htmllang"en"<head<metacharset"UTF8"<titleDocument</title</head<body<divstyle"width:30%;height:3.6rem;"<svg
Stella981 Stella981
4年前
Flutter接入现有iOS工程(混编)、开发调试、打包发布精简教程
本教程是在xcode11.1、cocospod1.7.5、flutter1.10.15pre.115下完成的。    1.安装flutter    按照官网的教程,一步一步来,没什么好说的。https://flutterchina.club/setupmacos/(https://ww
Stella981 Stella981
4年前
InsightFace源码以及pre
一下摘自:https://blog.csdn.net/Fire\_Light\_/article/details/79602705(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fblog.csdn.net%2FFire_Light_%2Farticle%2Fdetails%2F7960
Stella981 Stella981
4年前
Postman通过脚本设置请求的cookie
关于postman前置脚本的详细介绍: https://learning.getpostman.com/docs/postman/scripts/pre\_request\_scripts/(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Flearning.getpostman.com%
Wesley13 Wesley13
4年前
VS Code运行Jupyter报错
问题描述:今天在电脑中安装了Python3.8.5环境,然后使用pip安装了ipython和jupyter,没想到在VSCode中使用JupyterNotebook一直有问题,一直报一个错误:“UnabletostartsessionforkernelPython3.8.564bit.Selectanotherk
Stella981 Stella981
4年前
Python获取 当前目录、上一级目录
<pre<spanstyle"color:0000ff"import</span<spanstyle"color:000000"os</span<spanstyle"color:0000ff"print</span<spanstyle"color:800000"'</span<spanstyle"c
Easter79 Easter79
4年前
TiDB Pre
8月30日,TiDB发布PreGA版。该版本对MySQL兼容性、SQL优化器、系统稳定性、性能做了大量的工作。TiDB:SQL查询优化器调整代价模型优化索引选择,支持不同类型字段比较的索引选择支持基于贪心算法的JoinReorder
Wesley13 Wesley13
4年前
Upload a file with $.ajax to AWS S3 with a pre
转载自:https://gist.github.com/guumaster/9f18204aca2bd6c71a24生成预签名的Demo文档:https://docs.aws.amazon.com/zh\_cn/AmazonS3/latest/dev/PresignedUrlUploadObjectJavaSDK.html前端写法:生成签名:(.
Stella981 Stella981
4年前
Pre
PAT甲级1119,我先在CSDN上面发布的这篇文章:https://blog.csdn.net/weixin\_44385565/article/details/89737224(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fblog.csdn.net%2Fweixin_443855
Wesley13 Wesley13
4年前
Unity 获取场景中所有目标对象(包括不激活的对象)
usingUnityEngine;usingUnityEditor;usingSystem.Collections.Generic;publicclassExampleScript:MonoBehaviour{//获取场景中所有目标对象(包括不激活的对象)不包括Pre
Stella981 Stella981
4年前
Django之常用配置
<h1在其它文件导入及变量命名注意事项</h1变量命名:必须都大写<preclass'brush:python'fromdjango.confimportsettings</pre<h1静态文件夹配置</h1比如需要引入jquery、bootstrap等文件,需要配置静态文件,步骤如下:步骤一、在<项目名称目录下新建