set path for appcomponent by default routing angular code example
Example 1: set default route angular
{path:'',redirectTo:'login', pathMatch: 'full' },
Example 2: how to create app.routing.module.ts in angular 6
ng generate module app-routing --flat --module=app