I watched @ this SO Q and A and wondered if it is possible to create a base instead abstract class? Instead, is interfaceit possible to have different implementations of the base class in child components that are accessible to the parent component through a decorator @ViewChildin Angular2 ?
Ideally, I would like to have facilities for child components that are created through the parent Routerin order to be able to refer to the parent router - does this make sense? I want the baby to be able to call parentRouter.navigate(["SomeOtherRoute", { args: 'blah' }]);.
My initial approach was for the child components to implement a base class that the parent component would receive the link through the decorator @ViewChild. The parent will subscribeact on the child trying to raise the navigation event, and its handler will call router.navigate(since it has a router at the parent level).
source
share