The code is as follows:
The add () {
Enclosing $HTTP post ('./static/new_file - json. Json ', {name: this name}, {emulateJSON: true}), then (result=& gt; {
If (result. The status===0) {
Enclosing getAllList ()
} else {
Alert (' add failure)
}
})
}
Error:
CodePudding user response:
Json file is a static file does not support the post request