BioPhoton / angular-signature-pad

SignaturePad for angular
MIT License
53 stars 32 forks source link

Problem in Angular 6 #2

Open webnegar opened 6 years ago

webnegar commented 6 years ago

Hi, According to instructions, I did these steps

ng new app.. (angular6)

npm install angular-signature-pad --save

import { AngularSignaturePadModule } from 'angular-signature-pad';

@NgModule({
  imports: [
    ...
    AngularSignaturePadModule.forRoot()
  ]
  ...
})
export class AppModule { }

ng serve but i get this error:

ERROR in src/app/app.module.ts(5,43): error TS2307: Cannot find module 'angular-signature-pad'.

webnegar commented 6 years ago

Any suggestion?

mrsavvy commented 6 years ago

I have the same problem.

Prasanth-Android commented 6 years ago

i also facing same issue.please help me on this

ROHAN-TANDEL commented 6 years ago

is anyone got the fix for above

mrsavvy commented 6 years ago

I fixed the problem using the "angular2-signaturepad" https://www.npmjs.com/package/angular2-signaturepad, it works for me.

ROHAN-TANDEL commented 6 years ago

But When I try It I got no signature pad on the HTML page. BTW I am using angular 6 I was thinking some dependencies. Even My fellow colleague has used this https://www.npmjs.com/package/angular2-signaturepad It has worked well.

@mrsavvy I will give one more try for you suggested option.

webappaloosa commented 6 years ago

I'm having the same issue? Has anyone found a solution?

webappaloosa commented 6 years ago

The reference forRoot method is picked up by my IDE via the public_api.d.ts file, but i am still getting the following error:

ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve 'angular-signature-pad/public_api'

maybe needs an index.d.ts ???

webnegar commented 6 years ago

finally i fixed this issue by adding source code of module to my project instantly.

add this folder to your shared modules: angular-signature-pad/src/libs/angular-signature-pad/src/

sandisototo commented 6 years ago

finally i fixed this issue by adding source code of module to my project instantly.

add this folder to your shared modules: angular-signature-pad/src/libs/angular-signature-pad/src/

I don't think this is going to work this means you'll have to do the same for every environment your solution is running.

Any other ideas?

Ashveer7 commented 5 years ago

A little late but resolved my issues by renaming angular-signature-pad-0.0.13.tgz to angular-signature-pad-0.0.14.tgz

The package.json in node_modules points to 0.0.14 but the file doesnt exist.

ImRehanK commented 5 years ago

The issue is fixed by import module from 'angular-signature-pad/public_api'; But now there is compilation issue:

ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'AngularSignaturePadModule' was called.

This Line is causing the error. I don't know what to pass in forRoot(). Any Help: AngularSignaturePadModule.forRoot(),

jfrodriguezviamar commented 4 years ago

I got the same issue, i´ve tried all the posted solutions, but none worked for me.

takashi1kun commented 4 years ago

I got the same issue, i´ve tried all the posted solutions, but none worked for me.

Same, i tried every solution posted here and nothing works.