1.0.12 • Published 4 years ago

jsbnum-counter v1.0.12

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

JSBNumberCounter

  • A simple Number Counter Commponent to be used with Angular.
  • It is developed using Angular >=8.0.0 and its newly introduced ng g library schematics.
  • This library is part of JSBNumberCounter project and it is generated with Angular CLI version 8.3.21.
  • Library location: projects/jsbnum-counter directory of this repository.

Examples/Demo

  • A simple Example can be found under src/app directory of this repository.

Installation

npm i jsbnum-counter

Demo

App Demo

API

import { JSBNumCounterModule } from 'jsbnum-counter' selector: JSBNumCounter

@Inputs()

InputTypeRequiredDescription
NumberDatanumberYESthe Number Data to be disaplayed.

IE11

please use Pollyfill for IE support

Usage

1) Register the JSBNumCounterModule in your app module.

import { JSBNumCounterModule } from 'jsbnum-counter'

import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule, MatInputModule } from '@angular/material';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { JSBNumCounterModule } from 'jsbnum-counter'
import { AppComponent } from './app.component';

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

2) Use the selector (JSBNumCounter) in your component.

import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { AppService } from './app.service';
@Component({
  selector: 'mat-ta-root',
  template: `<JSBNumCounter [NumberData]='NumberData'>My Counter</JSBNumCounter>
`,
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  ///
}

Screenshot

Running the example in local env

  • npm i
  • Run ng serve for a dev server and running the demo app. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build the JSBNumCounter module

Run ng build JSBNumCounter to build the library. The build artifacts will be stored in the dist/jsbnum-counter directory. Use the --prod flag for a production build.

Running unit tests

Run ng test JSBNumCounter to execute the unit tests via Karma.

Credits

This project is based on JSBNumCounter. Also want to thanks entire Angular team for creating this awesome framework.

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago