I have a task to store a model value in my Electron Angular project . The rootscope model is binding the file path value .
I want to save this path on my project and every time when user will open this app by default it will be present there
$rootScope.Path = user_path[0];
I want to save this $rootScope.Path
and make the data persist on that location everytime.
Any way to achieve this in electron/node.js ?
EDIT:-
$rootScope.fPath = "C:\\";
/*Configure FILE path*/
const {dialog} = require('electron').remote;
$scope.getFile = function(){
var file_path = dialog.showOpenDialog({
properties: ['openDirectory']
});
console.log(file_path);
$rootScope.fPath = file_path[0] + "\\bin";
I want to make this $rootScope.fPath
path persist whenever I will open my app the previous selected path must be there already. So that I don't have to make further changes.