I love your videos and have watched about 90% of them in the Angular 16 series. Just a minor detail: in this particular video, the sound quality in some parts is not very good.
@procademy Жыл бұрын
Thank you for your feedback....i will rectify it in future lectures 🙂
@artsentertainment88759 ай бұрын
I have noticed that both "canActivate" and "canActivateChild" are protecting the child routes when applied on parent route(The catch here is both these guards are not protecting the parent route, But both the guards are protecting the child guards only). So Sir, I couldn't notice difference b/w these 2 guards, Can you please clarify the difference between canActivate and canActivateChild, And which one to be used in which situation? canActivate on Parent ------------------------------------ { path: "Courses", canActivate: [canActivate], children: [ { path: "Course/:id", component: CourseDetailComponent }, { path: "Popular", component: PopularComponent }, { path: "Checkout", component: CheckoutComponent }, ], }, canActivateChild on Parent -------------------------------------------- { path: "Courses", canActivateChild: [canActivateChild], children: [ { path: "Course/:id", component: CourseDetailComponent }, { path: "Popular", component: PopularComponent }, { path: "Checkout", component: CheckoutComponent }, ], },
@sasuke37378 ай бұрын
to protect the parent you will have to apply the canActivate to the parent seperately {path:course, component:courseComponent, canActivate:[canActivate]}
@akhileshk2864 Жыл бұрын
please do videos on RestAPI calls in Angular
@vaibhavregundawar46127 ай бұрын
Can't we use the same CanActivate function for protecting child in 2nd approch ( Angular 15 and above version)?
@hashiriqbal95834 ай бұрын
CanActivate protects parent as well as child but if we want to protect children of a parent then we use CanActivateChildFn that will protect children only and not the parent