🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

jp-ng-flash-cards

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jp-ng-flash-cards

NG FLASH CARDS is used to display card with front and back view.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

DESCRIPTION

Angular 6+ Flash Card. You can show a card with image and content, when click on the card it will rotate and show another card with diffrent content.

INSTALLATION

npm install jp-ng-flash-cards

How to use angular flash card in your angular app

Sample Code for Angular Flash cards

app.module.ts - Import the JpNgFlashCardsModule in your module

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import {JpNgFlashCardsModule} from 'jp-ng-flash-cards'; // import jp-ng-flash-cards


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.ts - Import the JpNgFlashCardsModule in your component

import { Component } from '@angular/core';
import {JpNgFlashCardsModule} from 'jp-ng-flash-cards'; // import it to your component

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
 public flashcardData: any;

  constructor() { // initiate it in your component constructor
    this.flashcardData = [
    {      
      front: { image:'https://raw.githubusercontent.com/dart-lang/logos/master/logos_and_wordmarks/angulardart-logo.png', title: 'Namaste', subtitle: 'Vanakam' },
      back: {
        title: 'meaning',
        subtitle: 'Hello, Greetings, I bless the divine in you',
        content: 'It is used to greet people every time they meet. It is usually initiated by the juniors'
      }
    },
    {
      front: {image: 'https://picsum.photos/200/300?image=0',
        title: '(Tapailai) Kasto chha?',
        subtitle: 'Eppadi Irukirergal ?'
      },
      back: {
        title: 'meaning',
        subtitle: 'How are you?',
        content: 'It is used to ask people how they are doing or feeling.'
      }
    }
    ]   
  }
}

app.component.html - Include the JpNgFlashCard library in your html component

<lib-jp-ng-flash-cards [flashCards]="flashcardData"></lib-jp-ng-flash-cards>

In the above example, I have used two cards for flash card. You can use multiple flash cards. Front side contain image, title, subtitle. Back side of the flash card contains title, subtitle, content.

You have to use the library in your html component and feed the [flashcard] value in array of objects format to load the flash card. You an feed single card or multiple card in array

VERSION

0.0.1 - Angular 6 Flash cards

Keywords

Cards

FAQs

Package last updated on 20 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts