I'm trying to protect routes with two subscriptions: Gold and Platinum. At the moment, I've created a new canActivate
guard for each subscription:
{
path: 'messages',
component: MessagesComponent,
canActivate: [AuthGuard, PlatinumSubscription]
},
{
path: 'inbox',
component: InboxComponent,
canActivate: [AuthGuard, GoldSubscription, PlatinumSubscription]
},
Is there a better way to validate their subscription without creating brand new canActivate classes?