angular - 如何从 BrowserPlatformLocation 扩展功能
问题描述
我正在寻找一种无需参数即可获取当前路线的方法。
例如,我找到了这个答案: Get current route without parameters
就像您看到的那样,有很多解决方法,但没有一个是简单明了的。
当我使用“ location.path()
”时,我注意到它使用“ BrowserPlatformLocation.pathname()
”,其中包含“没有参数的当前路由”。
所以问题是:
如何从“ BrowserPlatformLocation
”扩展功能。
解决方案
推荐阅读
- django - 在 Django 中获取多对多关系中的对象
- bitrix - Bitrix24 应用程序嵌入
- java - Asciidoc:从 .adoc 文件呈现的 HTML 大小问题
- r - 无法为签名“字符”找到函数“dbConnect”的继承方法
- r - 如何为 R 包的 CI 制作 azure-pipeline.yml?
- ios - 如何同步单元格动画
- react-native - 错误:捆绑失败:错误:无法从`index.js`解析模块`./src/App`:
- git - Git Checkout 删除和修改文件
- javascript - 滚动后 Chrome 扩展程序不起作用
- powerbi - 是否有 M 函数来创建表类型?