1๐
Did you try window.localStorage
? This should be context- and scope-unreliant.
- [Vuejs]-Vue js โ implementing a tree, nested component vs single
- [Vuejs]-Cycle.js โ Driver โ PhoenixJS (Websockets)
0๐
try to
- delete the local storage for this site in settings. URL=about:preferences#privacy
- close FF
- restart FF
it worked in my case โ I had updated to version 57 โ somehow my profile got corrupted
in Windows the FF profile is located at:
C:\Users[youraccountname]\AppData\Local\Mozilla\Firefox\Profiles\
- [Vuejs]-How to make it visible in github.io for a vue-cli project
- [Vuejs]-V-for loop method to not directly cause rendering
0๐
I had to change my code to solve the problem . The problem is when the LocalStorage is inside of an axios http response (setLanguage method) It works in Chrome but in firefox LocalStorage is empty. when i move the LocalStorage outside the response it works.
<script>
import 'vue-awesome/icons';
import {HTTP} from '../common/http-common';
export default {
props:['topNavbarOptions'],
data: function () {
return {
menuclicked: false,
locale:'en'
}
},
mounted:function(){
if(localStorage.getItem("locale"))
{
this.locale = localStorage.getItem("locale");
}
this.$i18n.set(this.locale);
},
methods: {
OpenMenu: function (menuclicked) {
this.menuclicked = !menuclicked;
this.$emit('openmenu', this.menuclicked );
},
setLanguage:function(localecode)
{
//Set front end locale
localStorage.setItem("locale",localecode);
//Set backend locale
HTTP.get('lang/'+localecode)
.then(response =>{
})
.catch(error=>{
console.log(error);
});
}
}
}
</script>
- [Vuejs]-Vue-tables-2 event emit not registering for custom filter
- [Vuejs]-VueJS โ The app cant locate the route
-1๐
Try this:
browser.storage.local.get() โ to retrive data
browser.storage.local.set() โ to post data
- [Vuejs]-Vuex. How to render data after it has been received from API before component started
- [Vuejs]-How to create a modular client-side / serverside application with different codebases (the JS part)?
Source:stackexchange.com