1.0.7 • Published 5 years ago
ngx-tag-complete v1.0.7
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
```javascript
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.