little-aspnetcore-todo icon indicating copy to clipboard operation
little-aspnetcore-todo copied to clipboard

Layout file from VS 2019 project does not match the book

Open CedricCicada opened this issue 4 years ago • 1 comments

On page 43, we are told to update the layout file by adding a line in a ul element. In my project, which was built in Visual Studio 2019, the shared layout file does not match what is in the book. I do not know where to put the added li element. _Layout.cshtml.txt

CedricCicada avatar Apr 11 '20 22:04 CedricCicada

The <ul> element has a different class now. There's only one block of code for a list in that file and it looks like this:

<ul class="navbar-nav flex-grow-1">
  <li class="nav-item">
    <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
  </li>
  <li class="nav-item">
    <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
  </li>
</ul>

Add this piece of code below the <li> for Privacy:

<li class="nav-item">
  <a class="nav-link text-dark" asp-area="" asp-controller="Todo" asp-action="Index">My to-dos</a>
</li>

Caedendi avatar Jun 01 '20 19:06 Caedendi