Route guards functions हुन् जो क्या navigation एक route मा/बाट allowed छ यो control गर्छन्। तिनीहरू route activate हुनु अगाडि चल्छन् (वा तपाईं एकबाट अलग हुनु अगाडि), authentication checks, permission control, र "unsaved changes" prompts enable गर्छन्।
Guard types
CanActivate → can the user enter this route? (auth/permission check)
CanActivateChild → same, for child routes
CanDeactivate → can the user LEAVE? ("you have unsaved changes")
CanMatch → should this route even be matched? (feature flags, role-based)
resolve → pre-fetch data BEFORE the route activates
