Skip to content

Commit 66db9aa

Browse files
committed
WIP - records-counts component
1 parent 1655314 commit 66db9aa

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

public/javascripts/angular-app.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
$routeProvider
2020
.when("/", {
2121
template: `
22-
<h1>Index</h1>
23-
<a href="/foo">Foo Page</a>
22+
<h1>MEAN Squad Library</h1>
23+
<p>Welcome to <em>MEAN Squad Library</em>, a library web application built with the MEAN Stack.
24+
<records-counts><records-counts>
2425
`
2526
})
2627
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<h1>Library Records</h1>
2+
3+
<p>The library has the following record counts:</p>
4+
5+
<ul>
6+
<li><strong>Books:</strong> {{count}}</li>
7+
</ul>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
(function() {
2+
3+
angular.module('app').directive('recordsCounts', Directive);
4+
5+
function Directive() {
6+
return {
7+
restrict: 'E',
8+
controller: Controller,
9+
templateUrl: '/records/records-counts.html',
10+
}
11+
}
12+
13+
Controller.$inject = ['$scope'];
14+
15+
function Controller($scope) {
16+
$scope.count = 11;
17+
}
18+
19+
})();

0 commit comments

Comments
 (0)