Skip to content

Commit

Permalink
Added nav bar using ngInclude
Browse files Browse the repository at this point in the history
  • Loading branch information
smashdevcode committed Mar 2, 2016
1 parent dbdefaa commit 1d8032b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
</head>
<body ng-app="todoListApp">

<ng-include src="'templates/navbar.html'"></ng-include>

<h1>My TODOs!</h1>

<div class="list" ng-controller="mainCtrl">
Expand Down
19 changes: 18 additions & 1 deletion public/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,21 @@ input[type="checkbox"] + span {
}
input[type="checkbox"]:checked + span {
background:url(checkbox-filled.svg) left top no-repeat;
}
}

nav ul {
text-align: left;
list-style: none;
margin-left: 0;
padding: 0;
}
nav ul li {
display: inline-block;
}
nav ul li a {
display: block;
margin: 0;
padding: 10px 15px;
color: #444;
background-color: #adadad;
}
6 changes: 6 additions & 0 deletions public/templates/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="http://teamtreehouse.com">Treehouse</a></li>
</ul>
</nav>

0 comments on commit 1d8032b

Please sign in to comment.