Load json from local file with http.get() in angular 2

前端 未结 7 1003
情歌与酒
情歌与酒 2020-11-29 00:38

I\'m trying to load a local json with http.get() in angular 2. I tried something, that I found here on stack. It looks like this:

this is my app.m

相关标签:
7条回答
  • 2020-11-29 01:35

    try: this.navItems = this.http.get("data/navItems.json");

    0 讨论(0)
提交回复
热议问题