Angular
`l l l s j 。
`l l l s j 。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Angular 循环input value值 显示 不循环问题
问题描述:html里循环 tr,table中放input,获取后端数据展示 显示为 input:2222 input:2222 应该为 input:1111 input:2222 错误代码如下: <tr *ngFor="let item of items;let i = index"> <td><input nbInput status="info" type...原创 2019-10-24 16:27:09 · 726 阅读 · 0 评论 -
Angular Nebular UI库 form表单验证
NebularUI库:这是一个俄罗斯的UI库,不知道为什么,并没有封装表单验证功能,可能是因为angular 有自己的一套表单验证方式吧~ https://akveo.github.io/nebular/docs/components/components-overview 感觉 歪果仁的审美 跟 中国UI库 还是有点差别的,功能也没有antd element 等组件库 那么万能. Angular...原创 2019-07-18 18:47:31 · 726 阅读 · 0 评论 -
Angular 从零开始 1- 搭建项目到 组件写法
Angular 中文网:环境搭建 https://www.angular.cn/guide/setup-local 一、启动过程介绍 1.启动顺序: main.ts 为入口 => app.module.ts =>app.component.ts =>app.component.html,app.component.css 2.Angular模块 每个 Angular...原创 2019-07-18 18:24:54 · 334 阅读 · 0 评论 -
Angular从零开始 2-基本语法,管道-数据格式转化
一. 数据绑定 (1)dom内绑定 {{ title }} (2)属性绑定 [src]="imgsrc" (3)事件绑定 (click)="handleClick($event)" (4)双向绑定 [(ngModel)]="text" (5)指令 -属性指令 :无法改变结构,但影响样式, [ngClass] 数组格式 对象格式 [ngStyle] 对象格式 [hidden...原创 2019-07-18 18:25:32 · 256 阅读 · 0 评论 -
Angular 从零开始 3-组件通信 生命周期
一. 组件间通信 @Input @Output 输入输出属性 ng g c child 1.父传子: app.component.html <app-child [myName]="name"></app-child> app.component.ts export chlass AppComponent{ name="父组件的name" } child.com...原创 2019-07-18 18:25:52 · 144 阅读 · 0 评论 -
Angular 从零开始 4- form表单验证
一. 表单简介 /* 所有的表单元素需要加上name属性 如果要验证怎么办? */ 二 模版驱动型表单 & 表单校验 // 支持双向数据绑定、变更检测、验证和错误处理 步骤: 1. novalidate 禁用浏览器默认验证 2. 引入 FormsModule 3. #kerwin= "ngForm" (使用 # 把表单指令对象导出到 kerwin 这个可引用变量中) ...原创 2019-07-18 18:26:13 · 540 阅读 · 0 评论 -
Angular 从零开始 5-依赖注入
一. 依赖注入内容介绍 // https://angular.cn/guide/architecture#依赖注入 “依赖注入”是提供类的新实例的一种方式,还负责处理好类所需的全部依赖。 大多数依赖都是服务。 Angular 使用依赖注入来提供新组件以及组件所需的服务。 injector->注册provider->提供服务 二 依赖注入的好处 依赖注入的目的是为了降低组件间的耦合, ...原创 2019-07-18 18:26:38 · 223 阅读 · 0 评论
分享