webpack本身出于安全考虑,因为不检查主机的应用程序容易受到DNS重新绑定攻击。但是,在我们的开发环境下,可以禁用掉disableHostCheck这一配置项。在 angular.json 配置文件中修改 "serve": { ...... "defaultConfiguration": "de
转载
2022-07-24 00:06:50
163阅读
One thing that we can do is to add styles directly to HTML elements that live within our component. However, in this lesson we see that style classes
转载
2017-08-15 16:06:00
69阅读
2评论
To add alernative theme, we can use :host-context() selector from Angular. So it will apply 'border-color: red' only when host wrapper element has 'au
转载
2017-06-11 02:15:00
41阅读
2评论
我实现了一个自定义structural指令,施加的host Element是<p>:运行时,Angular解析到模板里这一行:调用函数ɵɵtemplate,给创建一个LContainer:/** * Creates an LContainer for an ng-template (dynamically-inserted view), e.g. * * <ng-template
原创
2022-04-12 16:24:52
69阅读
我实现了一个自定义structural指令,施加的host Element是:运行时,Angular解析到模板里这一行:调用函数ɵɵtemplate,给创建一个LContainer:/** * Creates an LContainer for an ng-template (dynamically-inserted view)
原创
2021-07-13 14:49:22
62阅读
最近在Chrome浏览器调试的时候遇到一个问题,浏览器的控制台一直报错 Invalid Host/Origin header,在百度上看到也有人遇到过这个问题,参考链接:htt
原创
2022-07-07 11:31:34
770阅读
Create an app with routing config: If you want to generate a new module with routing , you can also do: Define env variable: You can create a custom e
转载
2017-03-23 21:48:00
252阅读
2评论
【Angular】关于angular引用第三方组件库无法改变其组件样式:host ::ng-deepcss修改:无效.ant-input-affix-wrapper .ant-input:not(:first-child){ padding-left: 30px;}修改上面就正常了:host ::ng-deep .ant-input-affix-wrapper .ant-input:not(:f
原创
2022-06-23 12:00:19
81阅读
1. Installl latest @angular/cli: The version I used is:6.0.0-rc.10 2. Create a new application: 3. Install material and cdk packages: Here need to add
转载
2018-05-03 19:43:00
288阅读
2评论
写在最前面 首先是我的目录结构 你要新建的是Dockerfile和nginx-angular.confDockerfile在 Angular 项目的根目录下面创建一个 Dockerfile 文件,内容如下#设置一个基本的镜像,FROM 后面是镜像的名字,这个镜像是 Docker 官方提供的,这个镜像里面包含了 Node.js,可以在node后跟冒号 申明东镜像版本。as builder 是给它起了
转载
2024-08-01 08:23:50
93阅读
相关链接angular视频课:https://www.bilibili.com/video/BV1iJ411F7Bf?p=3angular文档:https://angular.cn/guide/setup-localng-zorro-antd文档:https://ng.ant.design/docs/getting-started/zh 主要内容1. 安装Node.js以使用npm命令,
转载
2023-07-04 14:19:38
151阅读
Compile time configuration options allow you to provide different kind of settings based on the environment you're building the Angular app for. You m
转载
2018-01-23 19:19:00
215阅读
2评论
Install: Create a project: Run the project: Change the port: Create a component: The component will be created in src/app/contact-list-component. Gene
转载
2016-07-20 02:19:00
247阅读
2评论
If you want to style host component. You can use ':host-context'. In the host component, we have 'styled-component' class, we want to apply some css t
转载
2017-09-27 00:58:00
60阅读
2评论
1.设置代码结构 index.html放在外围 templates 包含 tabs.html 及 所有视图 2.为了便于修改 api 接口,在config.js 中 使用常量(EVN),标记所有接口 3.app.js 设置平台 $ionicPlatform 定义抬头 $httpProvider.de
转载
2017-01-03 21:47:00
119阅读
2评论
Angular
原创
2021-08-08 11:12:05
159阅读
It always again happens (especially in real world scenarios) that you need to configure your Angular app at runtime. That configuration might be fetch
转载
2018-01-23 02:43:00
186阅读
2评论
To define an Angular Animation, we using DSL type of language. Means we are going to define few animations ('fadeIn', 'fadeOut'). Then we need to defi
转载
2017-07-26 02:26:00
350阅读
2评论
添加脚本
原创
2022-07-17 00:06:50
102阅读
Angular - 预加载延迟模块在使用路由延迟加载中,我们介绍了如何使用模块来拆分应用,在访问到这个模块的时候, Angular 加载这个模块。但这需要一点时间。在用户第一次点击的时候,会有一点延迟。我们可以通过预加载路由来修复这个问题。路由可以在用户与其它部分交互的时候,异步加载延迟的模块。这可以使用户在访问延迟模块的时候更快地访问。本文将在上一个示例的基础上,增加预加载的功能。在上一节中,我
原创
2022-04-08 17:24:31
409阅读