|
7 | 7 | <meta http-equiv="x-ua-compatible" content="ie=edge"> |
8 | 8 | <title>Angular Part 7</title> |
9 | 9 | <meta name="description" content="Galvanize Full Stack self-paced Angular. Part 7: Angular Reddit Clone"> |
10 | | - <!-- Latest compiled and minified CSS --> |
11 | 10 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> |
12 | | - <!-- Optional theme --> |
13 | 11 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css"> |
14 | 12 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.4/lumen/bootstrap.min.css"> |
15 | 13 | <link rel="stylesheet" href="style.css"> |
|
81 | 79 | <p id="description">{{post.desc}}</p> |
82 | 80 | </div> |
83 | 81 | <div class="row"> |
84 | | - <p><span class="glyphicon glyphicon-calendar"></span><time title="{{ post.date | amDateFormat: 'dddd, MMMM Do YYYY, h:mm a' }}">{{post.date | amCalendar}}</time> | <span class="glyphicon glyphicon-comment"></span> |
85 | | - <ng-pluralize count="post.comments.length" when="{ |
| 82 | + <p><span class="glyphicon glyphicon-calendar"> </span><time title="{{ post.date | amDateFormat: 'dddd, MMMM Do YYYY, h:mm a' }}">{{post.date | amCalendar}}</time> | <span class="glyphicon glyphicon-comment"></span> <span ng-click="showComments(post); $event.stopPropagation()"><ng-pluralize count="post.comments.length" when="{ |
86 | 83 | '1': '{{post.comments.length}} comment', |
87 | | - 'other': '{{post.comments.length}} comments'}"></ng-pluralize> | <span class="glyphicon glyphicon-pencil"></span><span ng-click="showCommentForm(post); $event.stopPropagation()">Add Comment</span></p> |
| 84 | + 'other': '{{post.comments.length}} comments'}"></ng-pluralize></span> | <span class="glyphicon glyphicon-pencil"></span><span ng-click="showCommentForm(post); $event.stopPropagation()">Add Comment</span></p> |
| 85 | + <div ng-show="commentsView" ng-repeat="comment in post.comments"> |
| 86 | + <p><strong>{{comment.author}}</strong> - {{comment.text}}</p> |
| 87 | + </div> |
88 | 88 | <form ng-show="commentForm"> |
89 | 89 | <div> |
90 | 90 | <label for="author">Author</label> |
|
93 | 93 | <input type="text" ng-model="comment.text" name="text" placeholder="Comment"> |
94 | 94 | <button class="btn btn-default" type="submit" ng-click="addComment(post); $event.stopPropogation()">Add Comment</button> |
95 | 95 | </div> |
| 96 | + </form> |
96 | 97 | </div> |
97 | 98 | </div> |
98 | 99 | <div class="clearfix"></div> |
|
0 commit comments