How to handle net::ERR_CONNECTION_REFUSED in Angular2

后端 未结 3 521
臣服心动
臣服心动 2021-02-07 01:30

error-handling shows how to handle errors as follows:

private handleError (error: Response | any) {
  // In a real world app, we might use a remote logging infra         


        
3条回答
  •  梦谈多话
    2021-02-07 02:31

    This happens when you try to reach an insecure https site.

    A solution is : first connect to the insecure site with your browser, a warning page will display. Click on "advance parameter" and accept this site as secure. Second you can reach this destination with your Angular code.

    Hope this helps.

提交回复
热议问题