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

Angular How to Format Reactive FormControls Values after Invoking Patch Value on ngOnInit
Add polyfill code in Angular 2
Bootstrap different app modules in Angular with angular-cli
resource interrupted as script but transfered with MIME type text/plain;
Erron while running angular-cli project in windows when created form ubuntu
Angular 2 Testing a component with an observable without mocking
Angular 2: Singleton Services - Properties not remembered?
Ionic serve show this error Ionic2
“Expression has changed after it was checked” when using two instances of the same component
Inter Component Event Binding In Angular 2
Angular 2 identity method
Creating md-cards as links in Angular 2 Material
How to add angular 2 attributes inside a variable in angular 2 typescript class
Data transformation in Class vs Reducer (ngrx/redux)
Firebase Google OAuth 2.0 returns auth/network-request-failed in Angular 2 SPA
Angular 2 http.get request performed multiple time

Categories

HOME
node.js
rx-java
ruby-on-rails-4
firmware
monitoring
fiware
keen-io
custom-attributes
userform
speech-recognition
windows-forms-designer
mapkit
outlook-addin
iis-8
xhtml
google-vr
amazon-sqs
android-toast
google-play-games
row-number
executable-jar
libreoffice-base
cognos-10
twitter-typeahead
twincat-ads
derivative
gulp-sass
file-permissions
xfce
angular-openlayers
spacing
byte
choropleth
phpexcel-1.8.0
maven-exec-plugin
sequences
aspose-cells
quickbooks-online
citations
gunicorn
nn
dataweave
fitnesse-slim
inline
ansible-vault
google-console-developer
parasoft
family-tree
case-sensitive
appharbor
webrole
heyzap
nuodb
kubernetes-health-check
asana-connect
google-chartwrapper
spock-reports
dde
webtorrent
nsthread
powergrep
numerical-analysis
antivirus-integration
oql
gethostbyname
firefox-addon-bootstrap
f#-interactive
xcode4
tablecellrenderer
velocity.js
dynamics-nav-2009
build-dependencies
delphi-5
template-strings
fileapi
er-diagrams
seeding
lightroom
curator
chap-links-library
string-search
facade
kooboo
triples
rhodecode
psychology
mathgl
httpwatch
parallel.for
node-http-proxy
hiding
capability
visual-studio-test-runner
jlayer
wymeditor
statusnet
bootclasspath
windows-explorer
background-music
fql.multiquery
tao
context-sensitive-help
id-generation
testing-strategies

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