234234234

随笔分类 -  angular

初学前端,Angular 开张
摘要:页面文件: <form *ngFor="let form of list" [formGroup]="form"> <div class="form-group"> <label>姓名:</label> <input style="color: #000;" type="text" formCont 阅读全文
posted @ 2018-08-02 11:49 你若愿意,我一定去 阅读(1191) 评论(0) 推荐(0) 编辑
摘要:新建一个共享模块:如shareModule, 并在该模块下新建HelloComponent组件 再建两个模块: module1, module2来共享shareModule中的HelloComponent组件 第一步: 在shareModule 的shareModule.ts 文件中找到 expor 阅读全文
posted @ 2018-05-18 15:47 你若愿意,我一定去 阅读(112) 评论(0) 推荐(0) 编辑
摘要:$ npm uninstall -g @angular/cli 阅读全文
posted @ 2018-05-11 19:00 你若愿意,我一定去 阅读(133) 评论(0) 推荐(0) 编辑
摘要:对表单数量多的情况,使用 1.form.reset(),这是清空表。form.reset(JSON格式的键值对),重置表单 2.form.set(JSON格式的键值对), 设置表单控件相对应的值。这是严格要求一对一,否则报错。 3.form.patchValue(JSON格式的键值对),设置表单控件 阅读全文
posted @ 2018-05-03 23:21 你若愿意,我一定去 阅读(207) 评论(0) 推荐(0) 编辑

23423423423
点击右上角即可分享
微信分享提示