b) Add RouterOutlet + Add a navigation link (routerLink)
+/* AppComponent's private CSS styles */
+h1 {
+ font-size: 1.2em;
+ margin-bottom: 0;
+}
+h2 {
+ font-size: 2em;
+ margin-top: 0;
+ padding-top: 0;
+}
+nav a {
+ padding: 5px 10px;
+ text-decoration: none;
+ margin-top: 10px;
+ display: inline-block;
+ background-color: #eee;
+ border-radius: 4px;
+}
+nav a:visited, a:link {
+ color: #334953;
+}
+nav a:hover {
+ color: #039be5;
+ background-color: #cfd8dc;
+}
+nav a.active {
+ color: #039be5;
+}
<h1>{{title}}</h1>
-<app-heroes></app-heroes>
+<nav>
+ <a routerLink="/heroes">Heroes</a>
+</nav>
+<router-outlet></router-outlet>
<app-messages></app-messages>