how to storage data in localstorage in chrome code example
Example 1: how to store edited data of chrome extension locally
{
"permissions": [
"storage"
]
}
chrome.storage.sync.set({ "yourBody": "myBody" }, function(){
});
chrome.storage.sync.get(["yourBody"], function(items){
});
chrome.storage.local.set({ "phasersTo": "awesome" }, function(){
});
chrome.storage.local.get(["phasersTo"], function(items){
});
Example 2: extension for local storage in angular 8
let user: User = { firstName: 'Henri', lastName: 'Bergson' }; this.storage.set('user', user).subscribe(() => {});