-3

I am new to angular please help to identify the issue here

https://stackblitz.com/edit/angular-ntqzd6

Http failure during parsing for https://angular-ntqzd6.stackblitz.io/assets/data/employee.json"

san
  • 1,859
  • 4
  • 26
  • 38

1 Answers1

2

It looks like you've placed your assets directory inside your app directory. If you want to keep this structure, you'll have to update the angular.json to:

...
"assets": [
  "src/favicon.ico",
  "src/app/assets"
],
...

Additionally, you should notice that there is an open issue in the StackBlitz Github repository regarding asset serving. You should definitely switch to a local IDE for development like VSCode with Angular CLI, if you aren't already using one.

NiklasPor
  • 9,116
  • 1
  • 45
  • 47
  • Thanks. But it is not working if I put asset outside app.(https://stackblitz.com/edit/angular-zuw1fl) . I got a similar sample which is working(https://stackblitz.com/edit/htpgeterror-7tc5v70) . But could not identify the exact issue – san Aug 04 '19 at 09:20
  • Did you try it in a local IDE? Stackblitz is having issues with assets: https://github.com/stackblitz/core/issues/577 – NiklasPor Aug 04 '19 at 09:22