2.0.0 • Published 1 year ago

ng2pairs v2.0.0

Weekly downloads
55
License
-
Repository
github
Last release
1 year ago

ng2pairs

Angular 2 module for pairs game

View live example here: https://humakt83.github.io/ng2pairs/example/

Installation

Run npm install --save ng2pairs

Usage

To use this module in your @angular application simply import the module

import { PairsModule } from 'ng2pairs';

@NgModule({
    declarations: [],
    imports: [PairsModule.forRoot()],
})
export class ExampleModule {}

If you want to use custom pictures then utilize PairsService as follows:

import { Component, OnInit } from '@angular/core';
import { PairsService } from 'ng2pairs';

@Component({
...
})
export class MyComponent implements OnInit {

    constructor(private pairsService: PairsService) {        
    }

    ngOnInit() {
        this.pairsService.setImages(['path-to-image1/image1.png', 'path-to-image2/image2.png']);
    }
}

Above can be applied for custom cssClasses for pairs, just callthis.pairsService.setCssClasses('classRed', 'classBlue')`

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

2.0.0

1 year ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.4

5 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago