Problem component.html Angular 4

0

I'm having a little problem, I started my studies in Angular, I'm still understanding the operation of modules, components and services . But when I put an html structure in component.html, it just does not show anything on the page, if I delete this structure and only put a div with bootstrap, it shows on the screen. How can I solve this? I already got the selector tag and put it in app.component.html

   Div com bootstrap sendo mostrada em tela.

<div class="container">
  <div class="row">
    <p>teste</p>
  </div>
</div>

Estrutura html que não aparece em tela, localizada no teste.component.html. Exp:

<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Page Title</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
  <script src="main.js"></script>

</head>

<body>
<p>Teste</p>
</body>
</html>> 
    
asked by anonymous 22.12.2017 / 17:11

1 answer

-2

Apparently your code has a > at the end of </html>> remove and try again, since this test.component.html does not need <html> <head> ... because it already has index.html, it's a button that will be added in the middle of the page, an HTML injection ...

    
21.08.2018 / 13:24