I tried this method :
var fs = require("fs");
//or try
//var fs = require("file-system");
var cont = " selamm \n";
fs.writeFileSync("read2.txt", cont, { flag: 'a' },
err => {
});
Not working for Angular JS project. System err : "fs is not a function". System err "fs.existsSync is not a function" if I try "file system" library.
What alternatives can I use? Help?