From 1fae285e04592cf5169074d0a254debde3374c01 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 6 Jan 2021 23:05:29 +0200 Subject: [PATCH] docs: more closely align the `getting-started-v0` and `getting-started` docs examples (#40197) This commit aligns the code and style in the `getting-started-v0` docs example with that of the `getting-started` example more closely (except for the the parts that are intentionally different between the two). PR Close #40197 --- .../getting-started-v0/src/app/app.component.css | 4 +--- .../examples/getting-started-v0/src/app/app.component.ts | 5 +++-- .../examples/getting-started-v0/src/app/app.module.ts | 4 +++- .../src/app/top-bar/top-bar.component.ts | 9 ++------- aio/content/examples/getting-started-v0/src/main.ts | 5 +++-- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/aio/content/examples/getting-started-v0/src/app/app.component.css b/aio/content/examples/getting-started-v0/src/app/app.component.css index ba43f5120f..8b13789179 100644 --- a/aio/content/examples/getting-started-v0/src/app/app.component.css +++ b/aio/content/examples/getting-started-v0/src/app/app.component.css @@ -1,3 +1 @@ -p { - font-family: Lato; -} + diff --git a/aio/content/examples/getting-started-v0/src/app/app.component.ts b/aio/content/examples/getting-started-v0/src/app/app.component.ts index e98ec2a712..68478a8623 100644 --- a/aio/content/examples/getting-started-v0/src/app/app.component.ts +++ b/aio/content/examples/getting-started-v0/src/app/app.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: [ './app.component.css' ] + styleUrls: ['./app.component.css'] }) -export class AppComponent {} +export class AppComponent { +} diff --git a/aio/content/examples/getting-started-v0/src/app/app.module.ts b/aio/content/examples/getting-started-v0/src/app/app.module.ts index 1dbba86431..c9fa322589 100644 --- a/aio/content/examples/getting-started-v0/src/app/app.module.ts +++ b/aio/content/examples/getting-started-v0/src/app/app.module.ts @@ -20,6 +20,8 @@ import { ProductListComponent } from './product-list/product-list.component'; TopBarComponent, ProductListComponent ], - bootstrap: [ AppComponent ] + bootstrap: [ + AppComponent + ] }) export class AppModule { } diff --git a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts index e531b08799..12fe8c9488 100644 --- a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts +++ b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts @@ -1,15 +1,10 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'app-top-bar', templateUrl: './top-bar.component.html', styleUrls: ['./top-bar.component.css'] }) -export class TopBarComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } +export class TopBarComponent { } diff --git a/aio/content/examples/getting-started-v0/src/main.ts b/aio/content/examples/getting-started-v0/src/main.ts index 61c5f24eca..c7b673cf44 100644 --- a/aio/content/examples/getting-started-v0/src/main.ts +++ b/aio/content/examples/getting-started-v0/src/main.ts @@ -1,11 +1,12 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { environment } from './environments/environment'; import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule); +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err));