ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 122 forks source link

[open-on-focus] attributes cannot bind in version 1.0.2 or 0.13.0, but it's ok in version 0.16.0. #337

Open zoeylee opened 6 years ago

zoeylee commented 6 years ago

IMPORTANT

<div ngui-auto-complete
                [source]="arrayOfStrings"
                [accept-user-input]="true"
                [open-on-focus]="false"
                (valueSelected)="add($event)"
                (ngModelChange)="myCallback1($event)"
                (customSelected)="customCallback($event)"
                placeholder="enter text">

core.es5.js:1020 ERROR Error: Uncaught (in promise): Error: Template parse errors: Can't bind to 'open-on-focus' since it isn't a known property of 'div'. ("
[source]="arrayOfStrings" [accept-user-input]="true" [ERROR ->][open-on-focus]="false" (valueSelected)="add($event)" (ngModelChange)"): ng:///PagesRoutingModule/CreateStatusProbeModalComponent.html@100:16

Steps to reproduce and a minimal demo

  a) npm install @ngui/ngui
  b) import { NguiAutoCompleteModule } from '@ngui/auto-complete';
      imports: [
          NguiAutoCompleteModule
      ]
  c) <div ngui-auto-complete
                [source]="arrayOfStrings"
                [accept-user-input]="true"
                [open-on-focus]="false"
                (valueSelected)="add($event)"
                (ngModelChange)="myCallback1($event)"
                (customSelected)="customCallback($event)"
                placeholder="enter text">

Other information

it's ok when I installed 0.16.0.
  npm install @ngui/auto-complete@0.16.0 --save