We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
因把大部分依赖包做了升级,所以需删除原有的node_modules重新使用yarn下载
yarn
Angular 8更新功能纪要](https://code.aliyun.com/ithinkdt-s13n/front/wikis/angular-v8-update-main-contents)
官方文档
之前
@ViewChild('tableOpr') tableOpr;
现在
@ViewChild('tableOpr', { static: false }) tableOpr;
{path: '/admin', loadChildren: './admin/admin.module#AdminModule'}
{path: `/admin`, loadChildren: () => import(`./admin/admin.module`).then(m => m.AdminModule)}
HttpModule
Http
HttpModule --> HttpClientModule Http --> HttpClient
如果使用旧版HttpModule和Http服务,更改为HttpClientModule和HttpClient服务。
rxjs
rxjs-compat
3.4.1
<nz-form-control nzErrorTip="Please input your username!"> <nz-input-group [nzPrefix]="prefixUser"> <input formControlName="userName" nz-input placeholder="Username" /> </nz-input-group> </nz-form-control>
<nz-dropdown nzPlacement="bottomRight"> <div nz-dropdown> 下拉菜单的名称 </div> <ul nz-menu nzSelectable> <li nz-menu-item > 下拉内容 </li> </ul> </nz-dropdown>
<div nz-dropdown [nzDropdownMenu]="langMenu" nzPlacement="bottomRight"> 下拉菜单的名称 </div> <nz-dropdown-menu #langMenu="nzDropdownMenu"> <ul nz-menu nzSelectable > <li nz-menu-item > 下拉内容 </li> </ul> </nz-dropdown-menu>
nzDropdownService
NzContextMenuService
import { nzDropdownService } from 'ng-zorro-antd';
import { NzContextMenuService } from 'ng-zorro-antd';
contextMenu
contextMenu($event: MouseEvent, template: TemplateRef<void>): void { this.dropdown = this.nzDropdownService.create($event, template); }
contextMenu($event: MouseEvent, menu: NzDropdownMenuComponent): void { this.dropdown = this.nzDropdownService.create($event, menu); }
menu
this.dropdown = this.nzDropdownService.create($event, template); this.dropdown.close();
this.nzContextMenuSrv.create($event, menu); this.nzContextMenuSrv.close();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
升级angualr8项目需要做的更改
Angular 8更新功能纪要](https://code.aliyun.com/ithinkdt-s13n/front/wikis/angular-v8-update-main-contents)
angular
1. @ViewChild和@ContentChild用法改变了
官方文档
之前
现在
2. 路由懒加载写法改变了
官方文档
之前
现在
3.
HttpModule
和Http
服务不再支持如果使用旧版HttpModule和Http服务,更改为HttpClientModule和HttpClient服务。
4. 如果项目有用到或者依赖中有用到
rxjs
6,请删除rxjs-compat
。5. 选择使用::ng-deep弃用/deep/
6.选择Node 10.9或更高版本(最好下载10.16.0)
7. typescript版本需要3.4.x及以上,如
3.4.1
ng-zorro-antd
1. form表单写法做了增强,写法如下:
2. Dropdown 不再需要 Component 包裹 Directive 的写法,避免 Component 的 selector 对于 样式的影响。
之前
现在
3.
nzDropdownService
名字换成了NzContextMenuService
之前
现在
4.
contextMenu
参数类型发生了改变之前
现在
5. 动态创建的
menu
关闭方法变更之前
现在
The text was updated successfully, but these errors were encountered: