forked from agrublev/angularLocalStorage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (63 loc) · 2.35 KB
/
Copy pathindex.html
File metadata and controls
71 lines (63 loc) · 2.35 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>
<head>
<!-- strictly for styling and demo purposes -->
<link rel="stylesheet" href="assets/foundation.min.css">
<link rel="stylesheet" href="assets/style.css">
<script src="assets/jquery-1.9.1.min.js"></script>
<link href="assets/prettify.css" rel="stylesheet" type="text/css" />
<script src="assets/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("pre", this).addClass("prettyprint");
});
</script>
<!-- end unnecessary files for demo -->
<script src="../components/angular/angular.min.js"></script>
<script src="../components/angular-cookies/angular-cookies.min.js"></script>
<script src="../src/angularLocalStorage.js"></script>
<script>
var eS = angular.module('exampleStore', ['angularLocalStorage']);
eS.controller('MainCtrl', ['$scope', 'storage', function ( $scope, storage ) {
storage.bind($scope, 'test', 'Some Default Text');
$scope.clearTest = function () {
storage.remove('test');
};
}]);
</script>
</head>
<body>
<div ng-app="exampleStore">
<div ng-controller="MainCtrl">
<div class="hero">
<h1>the simplest localStorage implementation, <b>ever</b></h1>
<h3>angular localStorage module</h3>
</div>
<div class="row">
<div class="large-12 columns">
<h2>How to use localStorage module</h2>
</div>
</div>
<div class="row">
<div class="large-4 columns">
<p>Variable: <b>{{test}}</b></p>
<label>localStorage variable value:</label> <input type="text" ng-model="test">
<a ng-click="clearTest()">Clear Value from LC</a>
<p style="font-size: 12px;"><i>Change the value in the textbox and refresh the page!</i></p>
</div>
<div class="large-8 columns">
<pre>
var eS = angular.module('exampleStore', ['angularLocalStorage']);
eS.controller('MainCtrl', ['$scope', 'storage', function ( $scope, storage ) {
storage.bind($scope, 'test', 'Some Default Text');
$scope.clearTest = function () {
storage.remove('test');
};
}]);
</pre>
</div>
</div>
</div>
</div>
</body>
</html>