Ngx-chips: Separator keys not working

Created on 28 Oct 2016  ·  8Comments  ·  Source: Gbuomprisco/ngx-chips

bug

All 8 comments

Any update?

Hi @jaysson,

Sorry I'll probably be able to fix it in the weekend

Hi @jaysson,

This should be fixed with the latest release :)

Hi trying to use your component ng2-tag-input, version 1.0.0 (compatible with Anguar2). We have a problem: separatorKeys do not work! Even we tried demo online (case with “space”) - and it did not work either. Do you have some hints for us? Thanks.

Hi @dimy4,

can you post here some code? You may want to try separatorKeyCodes, the demo is outdated

Thanks for soon response. Here is the code (I put “…” for irellevant parts)

new.component.html

...
<tag-input [(ngModel)]="items" [separatorKeys]="[188]" name="tag"></tag-input>
...

new.component.ts

...
@Component({
  selector: 'app-home',
  templateUrl: './new.component.html'
})
export class NewComponent implements OnInit {
  items = [];
  constructor() { }

  ngOnInit() {}
}

app.module.ts

...
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import {routing} from './app.routing';

import { AppComponent } from './app.component';
import { NewComponent } from './new/new.component';
import { FooterComponent } from './footer/footer.component';
import { HeaderComponent } from './header/header.component';

import { TagInputModule } from 'ng2-tag-input';

@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    NewComponent,
    …
  ],
  imports: [
    …
    TagInputModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

try separatorKeyCodes, the demo is outdated

Thanks, that works! I advice you to update the README.md. First version which I used produced problems (cause I am using Angular2) and your newest version uses Angular4. README.md tells the version works with Angular >=2. As I saw current version not working it confused mit a lot. But now it is OK (I am using 1.0.0). Thanks again and good luck.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sivamamidi-REISys picture sivamamidi-REISys  ·  3Comments

lukas-bernert picture lukas-bernert  ·  4Comments

Shinzah picture Shinzah  ·  3Comments

altschuler picture altschuler  ·  3Comments

cyrilrbt picture cyrilrbt  ·  4Comments