How to SetRoot and Push pages with angular router


Hello… I have an app in Ionic3 where navigation is done with navcontroller nav.push(page),nav.pop(page) nav.setRoot(page) events. I have updated my app to Ionic4 and changed Ionic Navigation to Angular router.
I have used angular starter templates from here I cannot find any documentation about the how i can achieve push and setroot kind of navigation with angular router.If the view i am switching to is not a child of the current view i need to destroy all the pages from stack. If the view i am switching to is a child of current view, i want the current view to be stacked.
Can you please tell me how can i do this?


Following article might help