We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99ccf5b commit 66e4cf7Copy full SHA for 66e4cf7
APM-Final/src/app/products/product-detail.guard.ts
@@ -13,6 +13,8 @@ export class ProductDetailGuard implements CanActivate {
13
next: ActivatedRouteSnapshot,
14
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
15
const id = +next.url[1].path;
16
+ // const id2 = next.paramMap.get('id');
17
+ // console.log(id2);
18
if (isNaN(id) || id < 1) {
19
alert('Invalid product Id');
20
this.router.navigate(['/products']);
0 commit comments