spa 应用一般有html5 history模式和hash模式,angular 默认是 history 模式,修改为hash 的方法:
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
重新运行项目即可
1.如需转载本站原创文章,请务必注明文章出处并附上链接,非常感谢。
2.本站用于记录个人 工作、学习、生活,非商业网站,更多信息请 点击这里
上一篇: css3背景颜色渐变动画