Hey all,
Having a bit of an issue with the following:
httpClient.get('../../assets/store/GenerateInitialViolations.txt').map((res: Response) => res.text()).subscribe(data => {
console.log(data.text());}
I’m getting a response when debugging:
{error: SyntaxError: Unexpected token I in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttp…, text: "Insert into violations ( VIC_UID, VIC_LEGAL_DESCRI… Non-respect cond/restrict permis", 500, VFHM113)"}
headers
It looks like it’s treating it as a JSON file for some reason and having a panic when it’s not in the right form. How do I fix this so I can read from this plant .txt file and just get it’s text?