I would like to set the <body>
tag as the root of my Angular application 2 instead of creating a <my-app>
(eg) child tag.
I would like to set the <body>
tag as the root of my Angular application 2 instead of creating a <my-app>
(eg) child tag.
Set body
as the root component chooser for your application.
Something like
import { Component } from '@angular/core';
@Component({
selector: 'body',
template: '<h1>{{mensagem}}</h1>'
})
export class AppComponent {
String mensagem = "Minha primeira aplicação Angular 2";
}