NativeJS - Navigation titles
Create your navigation title structure, and JSON-stringify it, then open the url: gonative://navigationTitles/set?persist=ture&data=JSON
For example:
1
var json = JSON.stringify({
2
active: true,
3
titles: [{
4
title: 'my title',
5
regex: '.*'
6
}];
7
});
8
window.location.href = 'gonative://navigationTitles/set?persist=true&data=' + encodeURIComponent(json);
Copied!
Setting persist=true will save the navigation titles for use the next time the app is launched, otherwise it will only take effect for the current instance.
To delete the navigation titles and revert to the appConfig.json definition, open the url: gonative://navigationTitles/set?persist=true
To do a one-off setting of the current page's title, url encode your title and open the url: gonative://navigationTitles/setCurrent?title=URLENCODEDTITLE
For example:
1
window.location.href='gonative://navigationTitles/setCurrent?title=Hello%20World';
Copied!
Last modified 1yr ago
Copy link