标签: angularjs rest accesscontrolexception
我在服务器上创建了REST API,并为其他用户提供了URL。 它从浏览器地址请求时返回JSON文件。 但 在AngularJS的html页面中使用该API时,提供了一个错误' No' Access-Control-Allow-Origin'标头出现在请求的资源上。起源' null'因此不允许访问。'
答案 0 :(得分:0)
您应该在REST API中启用CORS