9
canLoad和canActivate之間有什麼不同?Angular2 canLoad vs canActivate
export interface Route {
path?: string;
pathMatch?: string;
matcher?: UrlMatcher;
component?: Type<any>;
redirectTo?: string;
outlet?: string;
canActivate?: any[];
canActivateChild?: any[];
canDeactivate?: any[];
canLoad?: any[];
data?: Data;
resolve?: ResolveData;
children?: Routes;
loadChildren?: LoadChildren;
}
我應該什麼時候他們中的每一個?
如果我在上面的場景中使用'canActivate',會有什麼區別? – k11k2