Difference between Angular's canLoad and canActivate?

前端 未结 7 1377
梦谈多话
梦谈多话 2020-12-12 13:12

What is the difference between canLoad and canActivate?

export interface Route {
  path?: string;
  pathMatch?: string;
  matcher?:         


        
7条回答
  •  甜味超标
    2020-12-12 14:11

    Important to notice that canLoad won't stop someone from getting your source code. The .js won't be downloaded by browser unless user is authorized, but you can force a manual download by issuing a import('./xxxxx.js') on browser console.

    Module name can be easly found on you main.js on your routes definition.

提交回复
热议问题