angular2 路由

基礎 大多數帶路由的應用都要在 index.html 的 <head> 標籤下先添加一個 <base> 元素,來告訴路由器該如何合成導航用的 URL 。 如果 app 文件夾是該應用的根目錄,那就把 href 的值設置爲下面這樣: <base href="/"> 另外如果app不是根路徑則需要在<head>中使用 <script>document.write('<base href="' + do
相關文章
相關標籤/搜索