JSFiddle - React, Tailwind, and code Playground
by Marventus
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.10/ngStorage.js"></script>
<div ng-controller="MainCtrl">
<input type "text" ng-model="inputText" ng-keyup="storeText()" />
</div>
JavaScript
var myApp = angular.module("myApp", ["ngStorage"]);
myApp.controller("MainCtrl", ["$scope", "$localStorage", function($scope, $localStorage) {
$scope.storage = $localStorage;
$scope.inputText = typeof $scope.storage.inputText !== "undefined" ? $scope.storage.inputText : "";
$scope.storeText = function() {
$scope.storage.inputText = $scope.inputText;
};
}]);