forked from uttesh/ngtimeago
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (57 loc) · 2.07 KB
/
Copy pathindex.html
File metadata and controls
71 lines (57 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html ng-app="timeagoApp">
<head>
<title>Timeago</title>
<script src="demo/angular.js"></script>
<script src="ngtimeago.js"></script>
<script src="demo/app.js"></script>
<link rel="stylesheet" href="demo/bootstrap/css/bootstrap.min.css" />
</head>
<body ng-controller="LoadDates" style="margin: 0 25px 0; padding: 0 15px 0;">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Timeago</a>
</div>
</div>
</div>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1>ng-timeago!</h1>
<p>Is an AngularJS module for simple time ago on static data. No directives here, just a filters.
Mostly based on various snippets which I found on JSFiddle, with some changes by me.</p>
<p><a class="btn btn-primary btn-lg" role="button" href="https://codeload.github.com/uttesh/ngtimeago/zip/master">Download</a></p>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h1>Sample</h1>
<p>July 13, 2014 11:13:00 : {{dates[0] | timeago}}</p>
<p>{{sample1}} : {{dates[1] | timeago}}</p>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h1>Quick start</h1>
<p>
<pre>
bower install ng-timeago
</pre> <br>
or alternatively download and include `ngtimeago.js` after `angular.min.js`. <br>
Add the `ngtimeago` module as a dependency when creating your app, e.g. <br>
<pre>
var app = angular.module('myApp', ['ngTimeago']);`
</pre><br>
NO NEED TO INJECT in controller directly use in html.
</p>
</div>
</div>
</body>
</html>