angularjs - how to push all values from the txt file to local storage using angular js -
i have sample application can store values local storage when user clicks local button want values txt file in local storage "note2": [] .
to put data in localstorage in angularjs can use library angular-localforage.
example:
angular.module('yourmodule', ['localforagemodule']) .controller('yourctrl', ['$scope', '$localforage', function($scope,$localforage) { $localforage.setitem('myname','olivier combe').then(function() { $localforage.getitem('myname').then(function(data) { var myname = data; }); }); }]);
Comments
Post a Comment