title: Angular Routes or Sub components
body: <p>I Am creating CRUD for a Journey Entity and have created two components in Angular.</p>
  
  <ul>
  <li>List</li>
  <li>edit</li>
  </ul>
  
  <p>The list gets all the journeys from a service and displays them.
  The edit has a form which will add anew journey or edit a journey if it's passed a journey id.</p>
  
  <p>I have a lot of entities and am using routing with url parameters to achieve this:</p>
  
  <pre><code>     &lt;a mat-button [routerLink]="['/journey-edit', journey.id]"&gt;{{journey.name}}&lt;/a&gt;
  </code></pre>
  
  <p>I have now discovered Sub components where i can pass a journey from the list to the edit and then just hide the list:</p>
  
  <pre><code>    &lt;app-journey-view *ngIf="currentJourney" [journey]="currentJourney"&gt;&lt;/app-journey-view&gt;
  </code></pre>
  
  <p>Now I am stuck. Which way do I proceed?</p>
  
  <ul>
  <li>Do I need routing at all</li>
  <li>can I mix routing with subcomponents</li>
  <li><p>Authentication is on my route. Will that work with subcomponents:</p>
  
  <pre><code> {
   path: 'journey-list',
   component: JourneyListComponent,
   canActivate: [AuthGuardService]
   },
  </code></pre></li>
  </ul>
  
  <p>This app will have many entities and most entities will be linked through a relational database.</p>