博客
关于我
Angular Tracy 小笔记 其他 dos 命令,发布
阅读量:674 次
发布时间:2019-03-15

本文共 651 字,大约阅读时间需要 2 分钟。

其他命令:

  • Angular Material: ng add @angular/material
  • Add PWA support : ng add @angular/pwa
  • Add Dependency : ng add _____
  • Run and Watch Tests : ng test
  • Build for Production : ng build --prod

调试

F12 -> Source -> webpack -> 点儿 -> src -> app 找到我们要调试的文件,设置断点,可以查看逻辑错误

我们也可以利用谷歌插件 Augury "" 此时 F2 后, 会有一个tab 叫 Augury

Publish 发布项目

部署angular 项目在 xampp 中 将index.html中的base href改为如下内容

<!-- 

-->

<!-- ng build时使用下面这个 -->
<base href="./">
给app.moudle.ts文件中添加如下内容
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
...
providers: [ {provide: LocationStrategy, useClass: HashLocationStrategy}],
发布 ng build --prod --aot
项目目录,此时多了一个dist文件夹 (在 e2e 上面)

转载地址:http://nizqz.baihongyu.com/

你可能感兴趣的文章
nghttp3使用指南
查看>>
【Flink】Flink 2023 Flink 自动化运维的大规模落地实践
查看>>
Nginx
查看>>
nginx + etcd 动态负载均衡实践(一)—— 组件介绍
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + Tomcat + SpringBoot 部署项目
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>
Nginx - Header详解
查看>>
nginx - thinkphp 如何实现url的rewrite
查看>>
Nginx - 反向代理、负载均衡、动静分离、底层原理(案例实战分析)
查看>>
Nginx - 反向代理与负载均衡
查看>>
nginx 1.24.0 安装nginx最新稳定版
查看>>
nginx 301 永久重定向
查看>>
nginx 301跳转
查看>>
nginx 403 forbidden
查看>>
nginx connect 模块安装以及配置
查看>>
nginx css,js合并插件,淘宝nginx合并js,css插件
查看>>