@nirosha/n-tags
v0.0.4
Published
## Installation
Downloads
2
Readme
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);
}
}