1.3.3 • Published 4 years ago

ng-kamishibai v1.3.3

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

ng-kamishibai

Page transition library for Angular

Installation

Using npm:

$ npm install ng-kamishibai

Using yarn:

$ yarn add ng-kamishibai

Usage

Import KamishibaiModule

import { KamishibaiModule, KAMISHIBAI_PAGES } from 'ng-kamishibai';

@NgModule({
  declarations: [
    StartPageComponent, // example page component
    EndPageComponent, // example page component
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    KamishibaiModule, // import here
  ],
  providers: [
    {
      provide: KAMISHIBAI_PAGES, // Set up initial pages (optional)
      useValue: [
        StartPageComponent,
        EndPageComponent,
      ]
    },
  ],
  entryComponents: [
    StartPageComponent, // example page component
    EndPageComponent, // example page component
  ]
})
export class YourModule { }

Use KamishibaiComponent

<kamishibai></kamishibai>

Use KamishibaiService

import { Component } from '@angular/core';
import { KamishibaiService } from 'ng-kamishibai';

@Component({
  selector: 'your-selector',
  template: `
    <button type="button" (click)="previous()">previous</button>
    <button type="button" (click)="next()">next</button>
  `,
})
export class YourComponent {
  constructor(private kamishibaiService: KamishibaiService) { }

  previous() {
    this.kamishibaiService.previous();
  }

  next() {
    this.kamishibaiService.next();
  }
}

API

KamishibaiService

  • previous()
  • next()
  • add(component)
1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago

0.1.0

5 years ago