[尝试通过服务在Angular中调用此API文件。我以前可以轻松调用本地JSON文件,但这个不起作用。The second image is the table I want to setup for the data extracted ](https://i.stack.imgur.com/hqyKS.png)
This is what I tried already for the service file. When I tried this for the path for the local JSON file, it worked, but the structure of this file is not allowing me to do the same.
1条答案
按热度按时间anauzrmj1#
“.get()”返回的是一个观察对象,你必须订阅它才能得到API响应,否则什么都不会发生