mohsen77sk / angular-touch-keyboard

Virtual Keyboard for Angular applications.
MIT License
49 stars 16 forks source link

No directive found with exportAs 'ngxTouchKeyboard' #14

Closed guirms closed 11 months ago

guirms commented 11 months ago

I'm trying to use this really great lib in my Angular 16 application, but even if I follow the read.me instructions, I can't create the This is my app.module:

import { NgxTouchKeyboardModule }  from 'ngx-touch-keyboard';
...
@NgModule({
    declarations: [...],
    providers: [...],
    bootstrap: [AppComponent],
    imports: [..., NgxTouchKeyboardModule]
})

This is my html code: <input type="text" ngxTouchKeyboard #touchKeyboard="ngxTouchKeyboard" (focus)="touchKeyboard.openPanel()"/>

And this the error that I receive: No directive found with exportAs 'ngxTouchKeyboard' Image: image

mohsen77sk commented 11 months ago

Hi @guirms I'd like to thank you for your attention.

Please import "NgxTouchKeyboardModule" to Module of declaration "ProductionTimesDialogComponent".

guirms commented 11 months ago

Thanks @mohsen77sk, this works! I was using a standalone component, so all I need to do was import this module properly at my component class