0.0.4 • Published 5 years ago

@nirosha/n-tags v0.0.4

Weekly downloads
1
License
-
Repository
-
Last release
5 years ago

N-Tags

Installation

npm i @nirosha/n-tags

Usage

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { NTagsModule } from '@nirosha/n-tags';

import { AppComponent } from './app.component';
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    NTagsModule
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Sample code used in app.component.html

<n-tags 
	placeholder='Enter Email...'
	separator=','
	[areaStyle]='style'
	pattern = '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$'
  (getTag)="getTagList($event)"
></n-tags>

Sample code used in app.component.ts

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

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})

export class AppComponent {
  
  style = {};
  constructor() {
  	this.style = { 
  		'width': '600px', 
  		'border-radius' : '5px'
  	};
  }

  getTagList(tagList) {
    console.log(tagList);
  }
}
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago