Router 的原理

  • 实现简单的 hash 嵌套路由
  • 实现简单的 history 嵌套路由

打开 hash 路由示例

parcel src/index.html

打开 history 路由示例

parcel src/index-history.html