ngx-tag-complete
v1.0.7
Published
A simple shortcuts facilitator.
Downloads
10
Maintainers
Readme
NgxTagComplete
- A simple shortcuts facilitator.
- Enter '#' key and the desired shortcut and press 'Tab'.
Installation
Npm i ngx-tag-complete
Usage
In your module import { TagcompleteDirective } from 'node_modules/ngx-tag-complete';
import { NgxTagCompleteModule } from 'node_modules/ngx-tag-complete';
imports: [
NgxTagCompleteModule
]
In your component
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `<input [tagComplete]="shortcuts" />`,
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'autocomplete-fu';
shortcuts: any[] = [{shortcut: 'adm', value: 'administrator'}, {shortcut: 'ilj', value: 'i love javascript'}]
}
In input(or textarea) element, press # and type it shortcut, done this, press the tab key.