php - 在 state 方法中隐藏变量值
问题描述
使用的代码:
/*Main from other page with URL*/
.state("main/handler/location/userSso",{
url:"/main/handler/:location/:",
templateUrl:"component/common/main.html",
controller: 'MainController'
})
从一个模块到另一个模块:https ://example.com/#/main/handler/comp/99999300 必需:https ://example.com/#/main/handler/comp/
不想在 URL 中传递 UserID。
.state("main/handler/location/userSso" : users
所以应该从视图中隐藏。
解决方案
要在 url 中隐藏值,您必须在params
没有squash
$stateProvider
.state("main/handler/location/userSso",{
url:"/main/handler?location?userId",
templateUrl:"component/common/main.html",
controller: 'MainController',
resolve: {},
params: {
location: {
value: null
}
userId: {
value: null
}
}
})
推荐阅读
- javascript - 使用 AJAX 更改 Twig 模板变量
- ms-access - 从可填写的 PDF 数据导入 MS Access vba
- php - PHP curl 和输出 api 响应
- javascript - 从可点击列表中获取 ID
- android - 启动 InstallReferrerService (TagManager) 时出现 IllegalStateException
- android - 不使用主题中声明的颜色重音的材质组件
- sql-server - 带有 SET 和 LIKE 的 Sql 查询显示不正确的结果
- powershell - Powershell 查询 - 查询计算机中列出的程序和过滤
- r - 寻找将列表组件作为向量返回的函数
- templates - Kendo Mvc Grid - 过滤单元模板和样式