import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: './app.component.css' }) export class AppComponent { mensaje = 'Saludos desde el componente'; }
<!doctype html> <html lang="es"> <head> <meta charset="utf-8"> <title>Hola mundo</title> <base href="/"> </head> <body> <app-root></app-root> </body> </html>
import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.log(err));