首页 > 解决方案 > NGX-Virtual Keyboard Angular 6 throws error

问题描述

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"
/>

标签: angulartypescriptangular6

解决方案


ngx-virtual-keyboard 的文档未更新,演示应用程序也无法正常工作。

这是 9 个月前发布的,之后没有任何更新

我会建议你使用ngx 材质键盘。

它将提供自定义布局和许多其他东西。

你可以参考这个链接ngx-material-keyboard

希望这会帮助你。


推荐阅读