Menu
CoddyTech

回顾:事件

本课属于 Coddy Angular 学习旅程的“基础知识”单元。第 15 课,共 55 课。

challenge icon

挑战

简单

创建一个访客记录器。点击 record 时读取 name 输入框中的内容。将其存储在 last 段落中,并在每次记录时递增 count,初始值为 0。仅输入内容不会记录访客。将最后一个名字的初始值设为 None。

编辑提供的文件。编辑后按运行预览刷新预览,然后使用检查或运行代码来检查你的作品。保留要求的元素 ID。

亲手试试

<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="styles.css"></head><body><app-root></app-root><script type="module" src="main.ts"></script></body></html>

基础知识中的所有课