Angular
Angular7学习,是7!
兰兰的小窝
个人学习总结记录
展开
-
ng-zorro-antd与angular7实现表单验证
ng-zorro-antd表单的官网 (1)模板驱动表单验证 实现效果 代码如下: html <form nz-form> <nz-form-item> <nz-form-label nzRequired [nzSpan]="5">用户名</nz-form-label> <nz-form-control [nzSpan]="12"> <input #unameValid="n原创 2021-08-12 20:47:15 · 1010 阅读 · 0 评论 -
Angular建立路由三(一个文件夹下建立多个组件,实现单页面)
1.app.component.html <router-outlet></router-outlet> 2.app-routing.module.ts import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; const routes: Routes = [ { path: 'route', loadChildren: './rout原创 2021-08-01 01:08:50 · 257 阅读 · 0 评论 -
Angular建立路由二(在一个文件夹下建立多个文件夹,实现单页面)
在项目文件夹src/app下建立routes文件夹,在src/app/routes下建立login文件夹和test文件夹,实现路由:http://localhost:4200/route/login和http://localhost:4200/route/test 实现方法: 1.app.component.html: <router-outlet></router-outlet> 2 .在项目demo的app下建立以下如图文件 3.routes.routing.ts与ro.原创 2021-08-01 00:25:58 · 344 阅读 · 0 评论 -
ng-zorro中表格的全选问题
html <nz-table (nzCurrentPageDataChange)="onCurrentPageDataChange($event)"> <thead> <tr> <!--表头的复选框--> <th nzShowCheckbox [nzChecked]="checked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="onAllC原创 2021-07-05 01:21:47 · 923 阅读 · 0 评论 -
Angular建立简单路由(一)
已经建好一个Angular项目: 其他总结:安装指定版本的ng-zorro-antd与echarts(项目文件夹下) npm install [email protected] --save npm install [email protected] --save 开始~ 1.在app文件夹下,新建组件start和second,终端执行命令 ng generate component start ng generate component second 2.在app-routing.module.t原创 2021-06-17 16:44:26 · 373 阅读 · 0 评论 -
Angular入门前遇到的问题总结
1.环境 nodejs:我用的版本是v14.17.0 angular cli:最好不要安装太新的版本,由于版本的问题,我这个新手真的踩了好多不必要的坑 2.关于版本的命令 ng -v 一堆命令(已经安装了某个版本的angular) ng version 查看版本 3.angular的卸载和指定版本的安装 npm uninstall -g @angular/cli 卸载 npm cache clean 检查是否卸载干净 如果上面的命令报错:npm cache clean --force 再不行原创 2021-05-31 10:44:28 · 241 阅读 · 0 评论