How to reuse a Single Component with multiple routes without creating instance of Component again
问题 I am having two routes the first will get the list and the second get the details for each single item in a list. Initially I am displaying few values for each element in list with an action link and when the link is clicked it passes an id to method viewCoupon() and the route changes resulting in an error. How should I avoid creating an instance again and just call a different route. The code looks like below. export class CouponsComponent implements OnInit{ public couponList: Array<Coupons>