出現(xiàn)的問題
問題
解決方法
在app.module.ts文件下修改讀取url的策略俏脊,更改為使用Hash策略(HashLocationStrategy
)柒昏,之前使用的是HTML5策略(PathLocationStrategy
)柜某,所以不行浸船。
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
providers: [
{ provide: LocationStrategy, useClass: HashLocationStrategy }
]