https://github.com/eneajaho/cool-console
Angular library that displays cool messages in console.
https://github.com/eneajaho/cool-console
angular angular-service console console-color console-log cool library mit typescript
Last synced: 6 months ago
JSON representation
Angular library that displays cool messages in console.
- Host: GitHub
- URL: https://github.com/eneajaho/cool-console
- Owner: eneajaho
- Created: 2020-03-19T15:06:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-03T02:29:11.000Z (over 3 years ago)
- Last Synced: 2025-08-18T14:50:22.295Z (6 months ago)
- Topics: angular, angular-service, console, console-color, console-log, cool, library, mit, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ng-cool-console
- Size: 580 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 😎 Cool Console
Cool Console is an angular library that displays cool messages in console.

## Install
```bash
npm install cool-console --save
```
## Setup
Add CoolConsoleModule to App NgModule
```typescript
import { CommonModule } from '@angular/common';
import { CoolConsoleModule } from 'ng-cool-console';
@NgModule({
imports: [
CommonModule,
CoolConsoleModule.forRoot()
],
bootstrap: [App],
declarations: [App]
})
class MainModule {}
```
## Use
```typescript
import { CoolConsoleModule } from 'ng-cool-console';
@Component({...})
export class YourComponent {
constructor(private cc: CoolConsoleService) {
this.cc.success('✔ Successfully Initialized!');
this.cc.warning('âš Global Warning!');
this.cc.danger('💀 World is in danger!');
this.cc.info('🕊 Everything will be okay!');
this.cc.info({ name: 'ng-cool-console' });
/* Custom Log
* @param1 args
* @param2 color
* @param3 backgroundColor
*/
this.cc.log('🕊 Everything will be okay!', 'black', 'red');
}
}
```
### Global Options
Global options include the following options:
| Option | Type | Default | Description |
| ----------------| ------- | ------------- | ------------------------------------------------- |
| padding | string | '5px 10px' | Sets the padding for the console string box |
| borderRadius | string | '2px' | Sets the border radius for the console string box |
| fontSize | string | '16px' | Classes used on toastr service methods |
#### Setting Global Options
Pass values to `CoolConsoleModule.forRoot()`
```typescript
// AppModule
imports: [
CoolConsoleModule.forRoot({
padding: '6px 12px',
borderRadius: '5px',
fontSize: '18px'
})
],
```
## License
MIT
## Contributors
[@drdreo](https://github.com/drdreo/)
---
Author: [@eneajaho](https://github.com/eneajaho)