Skip to content
A simple directive to add easter eggs in your Angular 2+ application 👾
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix TypeError when keyCode is undefined (e.g. during autofill) Feb 26, 2018
tools/gulp First commit Apr 22, 2017
.gitignore First commit Apr 22, 2017
.npmignore First commit Apr 22, 2017
LICENSE Create LICENSE Jan 28, 2018
README.MD Update README.MD Jan 26, 2018
gulpfile.js First commit Apr 22, 2017
package.json up(version) Feb 28, 2018
tsconfig.json First commit Apr 22, 2017
tslint.json First commit Apr 22, 2017

README.MD

ngx-konami

npm npm npm

A simple directive to add easter eggs in your Angular 2+ application.

Installation

To install this library, run:

$ npm install ngx-konami --save

Getting started

Once you have published your library to npm, you can import your library in any Angular application :

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 :

<!-- You can now use the konami directive in app.component.html -->
<div (konami)="sayHello()"></div>

The method sayHello will be called when you type the konami code !

Contribute

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT ©

You can’t perform that action at this time.