腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(5460)
视频
沙龙
1
回答
CanLoad
防护
不允许
'/‘
路由
angular
、
canactivate
const routes: Routes = [ { path: 'login', component: LoginComponent },]; 但是
CanLoad
当
CanLoad
被拒绝时,
canLoad
有
浏览 19
提问于2019-02-13
得票数 0
回答已采纳
2
回答
在typescript中对同一方法使用不同的名称
angular
、
typescript
、
syntax
我使用Angular7,并为一些
路由
添加了延迟加载和守卫。export class LoggedInGuard implements
CanLoad
, CanActivate { // some logic which returns current user auth status
浏览 28
提问于2019-08-09
得票数 0
8
回答
Angular的
canLoad
和canActivate之间的区别?
angular
canLoad
和canActivate之间的区别是什么 path?: string;
canLoad
?: any[]; resolve?: ResolveData; children?
浏览 1
提问于2017-02-03
得票数 123
1
回答
CanLoad
保护在电子应用中可用吗?
angular
、
typescript
、
electron
、
angular-route-guards
使用NgRx选择器,我想在
CanLoad
保护程序中使用它,但我无法让它工作。routes.ts path: 'acquisition', loadChildren: () => import('./acquisition/acquisition.module').then(m => m.AcquisitionModule),},
can
浏览 4
提问于2020-10-20
得票数 0
回答已采纳
3
回答
预加载应用了
canLoad
的延迟
路由
angular
、
routing
文档上说我不能同时使用这两个功能 我想要实现的是懒惰加载
路由
,如果用户被授权访问该
路由
。
浏览 1
提问于2017-01-04
得票数 2
2
回答
是否忽略CanActivate AuthGuard?
javascript
、
angular
、
typescript
following routing configuration (src/app/index.ts) --请注意,这是一个stackblitz链接-它现在通过实现答案中的修复来工作-要断开它,请从图书模块
路由
中删除/books/books.module#BooksModule',}, books模块(src/app/books/index.ts)中的
路由
如下所示: export const routes: Routes =
浏览 25
提问于2019-01-03
得票数 1
回答已采纳
2
回答
角度2/4中的可枚举
路由
参数
angular
、
routing
、
angular2-routing
我们是否可以将动态
路由
参数限制为只接受我们预定义的值。假设我有以下
路由
: path: ":searchType", }
浏览 0
提问于2018-04-14
得票数 4
1
回答
角
路由
级联重定向(用户被重定向后跟随第二次重定向)
angular
、
typescript
、
angular-routing
有一个问题(可能只是因为了解原因)使用角度
路由
器。
canLoad
: [CanLoadAccountGuard] {/modules/dash-board/dash-boa
浏览 0
提问于2018-03-29
得票数 1
回答已采纳
1
回答
canLoad
不会阻止组件加载
angular
、
angular2-routing
我有一个带有实现
canLoad
: [AuthGuard]的
路由
的Angular应用程序,
canLoad
位于我的AuthGuard类中,如下所示:
canLoad
(route: ActivatedRouteSnapshot,我总是收到错误,因为
路由
的组件仍然在没有任何
路由
信息的情况下运行NgOnInit(),所以我最终会在没有参数的情况下进行API调用。我不太清楚AuthGuard是如何工作的,但是我在
canLoad
()函数上设置了断点,它们永远不会被触发。我是不
浏览 29
提问于2019-04-17
得票数 0
1
回答
将登录页面添加到纸张仪表板角度主题
html
、
angular
、
typescript
、
routing
app
路由
的app.routing.ts如下: TypographyComponent,}) 管理布局组件允许通过
路由
文件导航到其子页面are validated) this.router.navigate(['AdminL
浏览 13
提问于2019-10-24
得票数 2
1
回答
基于角色的相同路径上的延迟加载模块
angular
、
routing
、
lazy-loading
我认为使用Angular Guard或使用matcher不是正确的解决方案……import { Injectable } from '@angular/core';import { AuthService }from '@app/core'; @Injecta
浏览 0
提问于2018-11-20
得票数 2
6
回答
角2:如何从
CanLoad
实现中获取
路由
参数?
javascript
、
angular
、
angular-ui-router
我在一个懒惰加载的状态中添加了一个
canLoad
保护。我遇到的问题是,如果使用router.navigate()从不同的状态初始化状态,则无法获得任何
路由
参数。下面是我的
路由
配置:loadChildren: './program.module#ProgramModule',这是ProgramGuard的简短版本: export
浏览 3
提问于2017-05-08
得票数 6
回答已采纳
0
回答
基于Angular 5角色的
路由
激活
angular
、
authorization
、
angular-router
、
angular5
我知道我可以使用基于角色/身份验证的
路由
,并且我可以在
路由
模块激活和停用它。我也想隐藏的选项守卫为基础。我有一个[AuthGuard]和一个[RoleGuard],它们都实现了
canLoad
()、canActivate()等,并在
路由
时被分配给相应的属性。page: "Active Devices", path: "device-status",
canL
浏览 3
提问于2017-11-23
得票数 2
回答已采纳
1
回答
Angular guard
CanLoad
仅在第一次延迟加载时触发一次
angular
、
angular-router-guards
我在我的管理区有一个简单的守卫 path: 'admin', loadChildren: () =>data: { preload: false }它在我第一次登录时工作得很好,但是如果我注销,然后再次登录,它就不起作用了,所以我以 path: 'admin',
canLoad
浏览 4
提问于2021-03-02
得票数 0
1
回答
基于角色的authguard进入无限循环
angular
、
jwt
、
router
下面是我为canActivate编写的auth.gurad.ts代码。我希望实施基于角色的身份验证,以便在投资者登录时将其重定向到投资者仪表板,以便应用任何帮助 const currentUser = this.authenticationService.currentUserValue; debugger; switch(cur
浏览 0
提问于2019-03-10
得票数 1
1
回答
@角/
路由
器loadChildren中的gen路径名
angular
、
routing
我使用的是与loadChildren一起的延迟加载,在这里我可以使用相同的url有不同的页面。下面是我如何将它分开的示例: path: ':any', if(window.location.pathname.toLowerCase().indexOf('/some')==0){ }else{
浏览 0
提问于2019-09-11
得票数 0
回答已采纳
2
回答
具有AuthGuard的不同角色的多个/Dashboard
路由
angular
、
angular-routing
、
angular-route-guards
/dashboard/dashboard.module#DashboardModule',
canLoad
: [AuthGuard], canActivate: [AuthGuard], },/dashboard/dashboard.module#DashboardModule') { } } return false; } 当<em
浏览 23
提问于2019-03-05
得票数 1
2
回答
canLoad
防护
未获取更新值
angular
、
guard
、
angular-canload
我使用了一个服务的两个实例,它导致了问题 我被
canLoad
guard困住了。当我按下component中的一个按钮时,我想更改service中的false值,并让我的Guard加载一个模块。看起来它看不到值何时被更改并在我更新它之前触发 这是我的AuthGuard import { Injectable } from '@angular/core'; @Injectable({ providedIn:
浏览 35
提问于2021-10-11
得票数 0
1
回答
在深链上预先激活或预加载
angular
、
session
、
coldfusion
、
angular2-routing
假设用户在能够访问角度应用程序页面之前就已经登录并拥有会话,我
不允许
用户请求新的登录,或者让用户单击其他链接以使其深度链接正常工作。
路由
解析器似乎出现在事件序列中的
路由
保护之后,因此我很难确保
CanLoad
警卫能够访问SessionService成功加载的会话模型。 编辑:澄清如下。
canLoad
取决于会话中的值和特权级别,必须根据它们要访问的页面来检查它们。因此,我需要知道URL参数'unitId‘,而
canLoad
守卫,我不认为我可以访问路线?然后,我需要执行一个逻辑操作,
浏览 1
提问于2017-03-28
得票数 0
回答已采纳
1
回答
角13中的动态和延迟
路由
angular
、
angular-ui-router
在角项目中,首先在登录模块成功登录后,我从API中获取用户角色和用户数据,在该用户数据中,我必须在UI上创建动态侧栏,并在该侧栏上注册
路由
,侧边栏的JSON是 sidebarData = [
浏览 5
提问于2022-05-16
得票数 1
点击加载更多
相关
资讯
无线路由器怕被蹭网?安全防护不可少
手机设置路由器方法详解
碉堡了!99%的人都不知道的防蹭网终极攻略!
高防服务器的防御原理以及防御方式有哪些
DDoS防护的类型和线路综合优缺点
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
语音识别
活动推荐
运营活动
广告
关闭
领券