From 36664f3dbe0cdd3a410b5cf59fe22cfe7e307fcb Mon Sep 17 00:00:00 2001 From: Anand Raja Date: Fri, 27 Sep 2024 01:33:04 +0530 Subject: [PATCH] colorful console messages --- README.md | 1 + src/app/app.component.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c2c830..92153fe 100644 --- a/README.md +++ b/README.md @@ -231,3 +231,4 @@ To configure the pre-commit hook, simply add a `precommit` npm script. We want t - [GitHub Actions for Angular](https://github.com/rodrigokamada/angular-github-actions) - [Angular 16 - milestone release](https://github.com/actionanand/ng16-signal-milestone-release) +- [Colorful Console Message](https://www.samanthaming.com/tidbits/40-colorful-console-message/) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 88f71ec..b14786a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -10,4 +10,15 @@ import { UserPlacesComponent } from './places/user-places/user-places.component' styleUrl: './app.component.css', imports: [AvailablePlacesComponent, UserPlacesComponent], }) -export class AppComponent {} +export class AppComponent { + styles = ['color: indigo', 'background: #90EE90', 'font-weight: bold', 'font-size: 18px'].join(';'); + + constructor() { + console.log( + '%cUse local setup by cloning the project to see it in full power with backend api calls.', + 'color: green; background: yellow; font-size: 23px', + ); + console.log('%c%s', this.styles, `git clone https://github.com/actionanand/angular-http-project.git`); + console.log('GitHub Location: ' + 'https://github.com/actionanand/angular-http-project'); + } +}