Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="videosContainer" ng-if="hasVideos">
- <hr/>
- <div ng-if="hasVideos">
- <h3>Videos</h3>
- <div>
- Order by:
- <select ng-model="sortOrder">
- <option value="-subscribers">Subscribers</option>
- <option value="title">Title</option>
- <option value="-date">Date</option>
- <option value="-length">Length</option>
- </select>
- Show by:
- <select ng-model="filterCondition">
- <option selected value="">All</option>
- <option value="category">Categories</option>
- <option value="date">Date</option>
- <option value="subtitles">Subtitles</option>
- </select>
- <select ng-if="filterCondition==='category'" ng-model="filterBy.category">
- <option selected value="">All</option>
- <option ng-repeat="category in categories" value="{{category}}">{{category}}</option>
- </select>
- <select ng-if="filterCondition==='date'" ng-model="filterBy.date">
- <option selected value="">All</option>
- <option ng-repeat="date in dates" value="{{date}}">{{date | date}}</option>
- </select>
- <select ng-if="filterCondition==='subtitles'" ng-model="filterBy.subtitles">
- <option selected value="">All</option>
- <option value="true">Yes</option>
- <option value="false">No</option>
- </select>
- </div>
- </div>
- <div id="videos" ng-repeat="video in videos | orderBy:sortOrder | filter:filterBy.category | filter:filterBy.date | filter:filterBy.subtitles">
- <p>{{filterBy.category}}</p>
- <p>Title: {{video.title}}</p>
- <img src="{{video.pictureUrl}}" alt="image"/>
- <p>Length: {{video.length | videoLength}}</p>
- <p>Category: {{video.category}}</p>
- <p>Subscribers: {{video.subscribers}}</p>
- <p>Date created: {{video.date | date}}</p>
- <p>Subtitles: {{video.haveSubtitles | formatSubtitles}}</p>
- <button ng-click="video.subscribers = video.subscribers + 1">Subscribe</button>
- <div id="commentsContainer">
- <h4>Comments: </h4>
- <ul ng-repeat="comment in video.comments">
- <li>Username: {{comment.username}}</li>
- <li>Content: {{comment.content}}</li>
- <li>Date created: {{comment.date | date : 'MMMM d, y HH:mm:ss'}}</li>
- <li>Likes: {{comment.likes}}</li>
- <li>Author blog: <a href="{{comment.websiteUrl}}">{{comment.websiteUrl}}</a></li>
- </ul>
- </div>
- <hr/>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement