You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!--
CO_OP_TRANSLATOR_METADATA:
{
"original_hash": "8223e429218befa731dd5bfd22299520",
"translation_date": "2025-08-24T00:09:49+00:00",
"source_file": "7-bank-project/1-template-route/assignment.md",
"language_code": "tw"
}
-->
# 改善路由
## 說明
目前的路由宣告僅包含模板 ID, 但在顯示新頁面時, 有時需要更多功能。讓我們透過以下兩個額外功能來改進路由實現:
- 為每個模板指定標題,並在模板變更時更新窗口標題為新標題。
- 增加一個選項,在模板變更後執行一些程式碼。我們希望每次顯示儀表板頁面時,在開發者主控台中打印 `'Dashboard is shown'` 。
## 評分標準
| 評分標準 | 卓越 | 合格 | 需要改進 |
| -------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| | 兩個功能均已實現並正常運作。標題和程式碼新增功能也適用於在 `routes` 宣告中新增的路由。 | 兩個功能均正常運作,但行為是硬編碼的,無法透過 `routes` 宣告進行配置。新增第三個具有標題和程式碼新增功能的路由無法正常運作或僅部分運作。 | 缺少其中一個功能或功能未正常運作。 |
** 免責聲明**:
本文件使用 AI 翻譯服務 [Co-op Translator ](https://github.com/Azure/co-op-translator ) 進行翻譯。雖然我們致力於提供準確的翻譯,但請注意,自動翻譯可能包含錯誤或不準確之處。原始文件的母語版本應被視為權威來源。對於關鍵資訊,建議使用專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或錯誤解釋不承擔責任。