Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-sheba

Iran sheba for anuglar 2+

Used iran-sheba source for compatibilty with typescript

Installation

Install via npm

npm install angular-sheba -S

Usage

Add ShebaService in app.module providers

import { NgModule } from '@angular/core';
import { ShebaService } from 'angular-sheba';

@NgModule({
    declarations: [
        .
        .
        .
    ],
    imports: [
        .
        .
        .
    ],
    providers: [
        ShebaService
    ]
})
export class AppModuleShared {
}

Use it in your component

import { Component } from '@angular/core';
import { ShebaService } from 'angular-sheba';

@Component({
    .
    .
    .
})

export class ExampleComponent {
    
    constructor(private shebaService: ShebaService) {
        console.log(this.isValid("IR012345678901234567890123"));
        console.log(this.recognize("IR012345678901234567890123"));
    }

    isValid(shebaNumber: string){
        return this.shebaService.isValid(shebaNumber)
    }

    recognize(shebaNumber: string){
        return this.shebaService.recognize(shebaNumber)
    }
}

About

Iran sheba for anuglar 2+

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages