angular


ng2-tag-input separatorKeys not working


I am trying to use ng2-tag-input module , with a very basic configuration:
import { Component } from '#angular/core';
#Component({
moduleId: module.id,
selector: 'search-form',
template: `<tag-input [(ngModel)]='items'></tag-input>`
})
export class SearchFormComponent {
items = ['Pizza', 'Pasta', 'Parmesan'];
options = {
placeholder: "+ term",
secondaryPlaceholder: "Enter a new term",
separatorKeys: [32,13]
}
onItemAdded(item) {
}
onItemRemoved(item) {
}
}
Everything works, except separatorKeys - it has no effect, when I type space key (keyCode=32), it behaves as a normal space instead of a separator.
On the demo page their example works fine, is this something that can be related to NG2 version?
https://github.com/Gbuomprisco/ng2-tag-input
I am the author of the module.
It does not seem you are setting the separatorKeys attribute in your template. Have a look at http://www.webpackbin.com/NJy38G8kM for the source code.

Related Links

Add Lodash to VS2015 Angular2 Project
cannot find module errors after upgrading to angular-2.0.0-rc.4
Angular 2 don't dectect change on an Observable
Convert date in format accepted by restService
Reset forms in Angular2
Angular 2 - App Component Protect
GetSentry RavenJS not importing in webpack build
Wait for Angular 2 to load/resolve FormBuilder/ControlGroups before rendering view/template
Angular2 CanActivate from beta to current RC3
Rxjs: Why this stream of array not recieving new values
Page transitions in Angular 2
Base64 image with charset=utf-8; not displayed in Ionic2
Getting a wrong object through behavior suject
How to create complex(nested) JSON object in typescript in Angular2
Angular2 Router 3.0 beta 1 ( Child routes via Routerlink failed)
Angular2 AfterViewChecked not firing on a directive when binding is complete on RC4

Categories

HOME
react-native
hyper-v
arduino
loops
composer-php
web-crawler
sharppcap
bloomberg
filesystems
linuxmint
access-token
geoserver
formula
servo
dijkstra
double
spring-aop
benchmarking
spring-data-elasticsearch
smt
systemml
beatbox
react-boilerplate
integer
konvajs
polymer-1.0
visualvm
mysql-error-1064
react-apollo
frama-c
remote-connections
angular-openlayers
postgresql-8.3
grunt-connect-proxy
pam
tensorflow-serving
umbraco-mvc
dos
angularjs-ng-model
powerdesigner
ngrx-effects
james
homescreen
nerdtree
jes
roc
burn
evosuite
api-manager
run-configuration
cakephp-3.3
matlab-uitable
django-media
implicit
nosuchelementexception
angularjs-service
schemaless
powershell-tools
rpath
vibration
rate
svg-edit
gio
android-image
post-commit
kmip
idfa
iis-8.5
typing
testdroid
google-roads-api
struts2-jquery-grid
togglz
assignment-operator
command-line-tool
busy-waiting
avm2
qubole
akeneo
smslib
kermit
ekeventstore
visual-studio-2010-sp1
resharper-plugins
casbah
dav
controltemplate
invalidation
impactjs
mathgl
sandbox-solution
android-x86
stubs
ereg
jwebunit
customvalidator
timezoneoffset
git-add
in-app
registrar
google-doodle
winqual
clean-language
microsoft.build
progressive-enhancement
reverse-debugging
pointer-arithmetic

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App