Hi
Let me tell you the scope first:
My app has more than 100 pages and I’m storing font values to ionic storage.
Currently I’m getting these values in each page like this:
//Get English Key
this.storage.get('showEnglishKey').then(showEnglishKey=> {
if(showEnglishKey== 'true') {
document.getElementsByClassName("classSelector")[0].classList.add("showEnglish");
} else {
document.getElementsByClassName("classSelector")[0].classList.remove('showEnglish');
}
});
Suppose, if I want to change anything then I’ve to change in all my 100+ pages.
Is there any method/function that I’ll save it in one function/page and just call it.
Best Regards