Check out example codes for "how to create app.routing.module.ts in angular 6". It will help you in understanding the concepts better.

Code Example 1

ng generate module app-routing --flat --module=app

Learn ReactJs, React Native from akashmittal.com