fs index.d.ts I can see fs library but I can't use
my problem if I write require cmd error also, after installed fs of npm install fs.
same error after install or before install fs
fs index.d.ts I can see fs library but I can't use
my problem if I write require cmd error also, after installed fs of npm install fs.
same error after install or before install fs
I connect between Node.js with Angular 6 using file-saver
npm install file-saver --save
import { saveAs } from 'file-saver';
const jsonObject: object = {
'City': [
{
'id': 1,
'name': 'Basel',
'founded': -200,
'beautiful': true,
'data': 123,
'keywords': ['Rhine', 'River']
},
{
'id': 1,
'name': 'Zurich',
'founded': 0,
'beautiful': false,
'data': 'no',
'keywords': ['Limmat', 'Lake']
}
]
};
const blob = new Blob([JSON.stringify(jsonObject)], {type : 'application/json'});
saveAs(blob, 'abc.json');