The largest Interview Solution Library on the web



Warning: include(../../menu/leftMenu/angularjs-storagedatatosession.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-storagedatatosession.php on line 36

Warning: include(../../menu/leftMenu/angularjs-storagedatatosession.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-storagedatatosession.php on line 36

Warning: include() [function.include]: Failed opening '../../menu/leftMenu/angularjs-storagedatatosession.php' for inclusion (include_path='.:/opt/alt/php53/usr/share/pear:/opt/alt/php53/usr/share/php') in /home/javatech/public_html/question/angularjsexample/angularjs-storagedatatosession.php on line 36
« Previous | 1 | 2 | 3 | Next »
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
</style>
</head>
<body>
<script type="text/javascript" src="https://javatechnologycenter.com/ajax/libs/angularjs/1.4.1/angular.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/ngstorage/0.3.6/ngStorage.min.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', ["ngStorage"])
app.controller('MyController', function ($scope, $localStorage, $sessionStorage, $window) {
$scope.Save = function () {
$localStorage.LocalMessage = "LocalStorage: My name is Aarif Mohammad.";
$sessionStorage.SessionMessage = "SessionStorage: My name is Aarif Mohammad.";
}
$scope.Get = function () {
$window.alert($localStorage.LocalMessage + "\n" + $sessionStorage.SessionMessage);
}
});
</script>
<div ng-app="MyApp" ng-controller="MyController">
<input type="button" value="Save" ng-click="Save()" />
<input type="button" value="Get" ng-click="Get()" />
</div>
</body>
</html>
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com