ng-zorro / today-ng-steps Goto Github PK
View Code? Open in Web Editor NEW:raising_hand: 一步步学习 ng-zorro-antd
Home Page: https://ng-zorro.github.io/today-ng-steps/setup
License: MIT License
:raising_hand: 一步步学习 ng-zorro-antd
Home Page: https://ng-zorro.github.io/today-ng-steps/setup
License: MIT License
在 local-storage.service.ts 里面
这句写错了吧?判断既不是null也不是undefined,直接写就行了吧?
Excute: ng add ng-zorro-antd
错误提示:
Installing packages for tooling via npm.
undefined does not have an architect configuration
查看package.json
"ng-zorro-antd": "^1.5.0",是安装了的,是需要手动去配置APPModule么?
官方实战教程安装项目的命令
$ ng new today-ng
$ cd today-ng
$ ng add ng-zorro-antd
如果没有先执行 cnpm install --save ng-zorro-antd
而直接执行 ng add ng-zorro-antd
,则会提示Could not find module "ng-zorro-antd"
<input nz-input placeholder="请输入你喜欢的用户名" #usernameInput [(ngModel)]="username">
报错:Can't bind to 'ngModel' since it isn't a known property of 'input'.
app.module.ts中已经导入了FormsModule并添加进了NgModule中。
$ ng add ng-zorro-antd
ℹ Using package manager: npm
⚠ Unable to find compatible package. Using 'latest' tag.
⚠ Package has unmet peer dependencies. Adding the package may not succeed.
The package [email protected] will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/animations
npm ERR! @angular/animations@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/animations@"^13.0.1" from [email protected]
npm ERR! node_modules/ng-zorro-antd
npm ERR! ng-zorro-antd@"13.2.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/circle/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/circle/.npm/_logs/2022-06-14T04_36_03_626Z-debug.log
✖ Packages installation failed, see above.
At least we should translate this tutorial into English.
the sort function of todocomponent doesn't work
在系列教程的最后的一篇文章中, 我们提到了一些可以作为进一步练习的功能点:
我们现在开放 PR 来丰富 Today 的功能. 如果你感兴趣的话, 可以在完成教程之后尝试实现其中的一个或几个. 通过了我们的 review, 你的代码将会成为这系列教程的一部分, 可以被其他的人学习. 我们还会将你的 ID 添加到 CONTRIBUTOR.md
文件中.
当你打算实现其中某个功能的时候, 请先在这个 issue 里声明你在做这个, 避免他人的重复劳动.
当你想要提交 PR 之前, 请在 GitHub Pages 上部署好这个项目, 方便预览. 如果你觉得你有必要解释一下你的代码给后面学习的人, 请写一个 markdown 文件.
如果你想到了其他的好功能, 请随意提 issue 说你想要添加某个功能.
已经完成的声明会被收起, 以方便他人阅读.
另外, 还有以下任务可以完成:
大挑战:
@wendzhue 2019
PS:最近有点忙……十月份开始陆续更新
在指引文件中,ervices/local-storage --module app
,执行这一步的时候,会报错:
Unknown option: '--module' Unknown option: 'app'
,
即便我尝试添加flat也依旧如此。
这个问题该怎么解决呢
在切换 list 的时候, 即使两个 list 下同顺序的 todo 是相同的, 也会重新渲染而导致闪烁.
小提示: 使用 ngFor 的 trackby 指令.
现在 ng-zorro-antd 是完全中文的.
layout固定头部后,content如有表单或卡片,且有垂直滚动,头部会被覆盖,请问这个如何解决?谢谢!
第一篇的localStorage的service
public get<T>(key: string): any {
return JSON.parse(ls.getItem(key)) as T;
}
希望作者能够明白这样做对于新手的好处,新手希望通过这篇文章快速上手ng-zorro 而不是因为版本的缘故卡在bug中,在此基础上能够希望作者考虑我的提议
自从本系列教程的 1.0 版本发布以来,ng-zorro-antd 已从 1.1.0 升级到 8.3.x,新增了大量组件和实用功能,一些老的写法也被逐渐废弃,Angular 也已从 6 升级到 8,因此原本的教程已经不足以反映 ng-zorro-antd 的强大功能,也会给如今的 Angular 初学者造成理解上的困难。因此我们启动了 2.0 版本的写作计划,目的在于:
共分为以下 xx 课(暂定):
我会先将项目完整的代码推送到 master 分支,然后将按章节 commit 的代码和教程文本推送到 2.0.0 分支。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.