angular6 - Angular 6 - 使用 window.location.reload() 时重复重新加载页面
问题描述
我正在使用 Angular 6,当用户点击主页时,我需要重新加载相同的路由 url。我尝试在 ngOnit 中使用 window.location.reload(),但屏幕反复重新加载。我只想重新加载主页一次。
解决方案
推荐阅读
- python -
- sorbet - LoadError 在现有的 Rails 项目中运行`bundle exec srb init`
- mysql - MYSQL 获取最新的 10 行,但还包括可能不在 10 最新的行
- javascript - 有什么想法可以解决 Google Map API 上的错误消息?
- java - 如何以编程方式验证 Java 代码?
- c# - 如何使用 C# 在 XML 文件中搜索特定单词?
- python - 使用 Python OpenCV 的挤压/膨胀变形
- redis - Python3/Redis:redis.exceptions.ResponseError:未知命令'JSON.SET'
- r - R - 根据组和以前的元素操作最后一行
- itext - 使用 ITextRenderer 进行飞碟字体注册