aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/glossary/routers/index.html
blob: 016a3c1c32127ac84faa57fdadae7a3b5f060d98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: Routers
slug: Glossary/routers
translation_of: Glossary/routers
---
<p><strong>routers</strong> 是指路由器。在 Web 有兩種意思:</p>

<ol>
 <li>針對網路層,路由器是一種決定{{Glossary('封包')}}去向的網路設備。路由器是由 retailer 分發,允許用戶與網際網路互動。</li>
 <li>針對應用層的 {{Glossary('SPA')}},路由器是一種透過給定的 {{Glossary('URL')}} 來決定頁面如何呈現的函式庫。這個中間件(middleware)會藉由給定 URL 給檔案生成需要的路徑、以渲染下一頁的所需內容。</li>
</ol>

<h2 id="了解更多">了解更多</h2>

<h3 id="一般知識">一般知識</h3>

<p>針對網路層:</p>

<ul>
 <li>維基百科的{{Interwiki("wikipedia", "路由器")}}</li>
</ul>

<p>針對應用層,訪間熱門的 SPA 框架都有自己的路由器函式庫:</p>

<ul>
 <li><a href="https://angular.io/guide/router">Angular router</a></li>
 <li><a href="https://reacttraining.com/react-router">React router</a></li>
 <li><a href="https://router.vuejs.org">Vue router</a></li>
</ul>