V
V
Vitaly the Wise2018-02-13 16:51:33
HTML
Vitaly the Wise, 2018-02-13 16:51:33

How to fix the error the character encoding of the plain text document was not declared?

Good afternoon. I'm making a simple Angular learning application and ran into a problem.
I have routing:

{
    path: 'user',
    canActivate: [AuthGuard],
    children: [
      {
        path: 'create',
        component: CreateRequestComponent,
      },
      {
        path: 'update/:id',
        component: UpdateRequestComponent,
      }
   ]
}

That is, one way to create a user, and the other to update it. When I press the button everything works fine. But if I refresh the page, then I have an empty white page, in the console:
The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.

My index.html
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <!-- <meta charset="UTF-8"> -->
  <!-- <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> -->

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="favicon.ico" rel="icon" type="image/x-icon">

  <title>ANGULAR</title>
  <meta name="description" content="">

  <base href="/">
</head>

<body>
  <app-root></app-root>
</body>

</html>

If anyone knows please help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question