Why 'My Account/Your carts' link not working?
will-hu-0 opened this issue · 1 comments
will-hu-0 commented
Hi..
It seems that the link for 'My Account/Your cart' and 'My Account /Your wishlist' does not work...
Code looks
<li class="list-group-item hoverable">
<a [routerLink]="['/users', {outlets: {'profileOutlet': ['cart-items']}}]">Your Cart</a>
</li>
...
<router-outlet name="profileOutlet"></router-outlet>
It supposes to show cart into profileOutlet
I suppose.
Thanks.
will-hu-0 commented
Oh..
I know how to fix it..
By adding something below into user.routing.ts
import { CartProductsComponent} from "../product/cart-products/cart-products.component";
export const UserRoutes: Routes = [
{
path: 'users',
component: UserComponent,
canActivate: [ AuthGuard ],
children: [
{
path: '',
component: UserAccountComponent,
outlet: 'profileOutlet'
},
{
path: 'cart-items',
component: CartProductsComponent,
outlet: 'profileOutlet'
}
]
}
];