Routing is a useful concept of Angular. First read about it carefully and then try to implement it.
You can read this link: https://coryrylan.com/blog/introduction-to-angular-routing
2
solved How to use routing in angular 2 for query string parameter URL