Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lauthieb/ngx-konami
A simple directive to add easter eggs in your Angular application 👾
https://github.com/lauthieb/ngx-konami
angular angular4 angular5 angular6 directive easter-egg konami konami-js konamicode
Last synced: 28 days ago
JSON representation
A simple directive to add easter eggs in your Angular application 👾
- Host: GitHub
- URL: https://github.com/lauthieb/ngx-konami
- Owner: lauthieb
- License: mit
- Created: 2017-04-22T08:51:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T15:22:40.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T21:46:25.541Z (7 months ago)
- Topics: angular, angular4, angular5, angular6, directive, easter-egg, konami, konami-js, konamicode
- Language: JavaScript
- Homepage:
- Size: 2.88 MB
- Stars: 36
- Watchers: 2
- Forks: 6
- Open Issues: 16
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# ngx-konami
[![npm](https://img.shields.io/npm/v/ngx-konami.svg)]()
[![npm](https://img.shields.io/npm/dt/ngx-konami.svg)]()
[![npm](https://img.shields.io/npm/l/ngx-konami.svg)]()A simple directive to add easter eggs in your Angular 2+ application.
## Installation
To install this library, run:
```bash
$ npm install ngx-konami --save
```## Getting started
Once you have published your library to npm, you can import your library in any Angular application :
```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';import { AppComponent } from './app.component';
// Import the library
import { KonamiModule } from 'ngx-konami';@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,// Specify KonamiModule as an import
KonamiModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```Once your library is imported, you can use its directive in your Angular application :
```xml
```The method ```sayHello``` will be called when you type the konami code !
## Contribute
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:
```bash
$ npm run build
```To lint all `*.ts` files:
```bash
$ npm run lint
```## License
MIT ©