NGX-Virtual Keyboard Angular 6 throws error

时间:2018-07-25 05:19:50

标签: angular typescript angular6

Hello all i want to implement virtual key board I have added to module & included in my html but the above plugin is giving me error can some one help .I have also included in the module in imports array as well.

    Uncaught (in promise): Error: Unexpected value 'NgxVirtualKeyboardModule' 
    imported by the module 'ProfileModule'. Please add a @NgModule annotation.
    Error: Unexpected value 'NgxVirtualKeyboardModule' imported by the module 
   'ProfileModule'. Please add a @NgModule annotation.

This is the ts part

import { NgxVirtualKeyboardModule }  from 'ngx-virtual-keyboard';
export const profileRoutes: Routes = [
  {
    path: '',
    component: ProfileComponent,
  }
];

@NgModule({
  imports: [
    CommonModule,
    NgxVirtualKeyboardModule
  ],

This is the html part

<input type="text" value=""
  [ngx-virtual-keyboard]="true"
  [ngx-virtual-keyboard-layout]="layout"
  [ngx-virtual-keyboard-disabled]="false"
/>

1 个答案:

答案 0 :(得分:1)

ngx-virtual-keyboard的文档未更新,并且演示应用程序也不起作用。

此版本在9个月前发布,没有任何更新

我建议您使用 ngx材质键盘。

这将提供自定义布局和许多其他内容。

您可以引用此链接ngx-material-keyboard

希望这会对您有所帮助。