Oneia / read-more-angular2

2 stars 2 forks source link

Unable to declare ngx-readmore #4

Open abhijeet1403 opened 7 years ago

abhijeet1403 commented 7 years ago

Unexpected value 'ReadMoreDirective' declared by the module 'CoreModule'. Please add a @Pipe/@Directive/@Component annotation.

Oneia commented 7 years ago

did you import the directive like here https://github.com/Oneia/read-more-angular2/blob/master/example/src/app/app.module.ts#L5 ?

nartc commented 7 years ago

Yes I did import the directive like in your example. Angular 4

murraybauer commented 6 years ago

The latest angular cli gave me this error on compile. If I just manually copied the directive code into my project it worked.

Module build failed: Error:/node_modules/ngx-read-more/index.ts is missing from the TypeScript compilation. 

Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. 

Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
mpintener commented 6 years ago

@murraybauer I'm having the same error

murraybauer commented 6 years ago

@mpintener I didn't worry in the end. Would be good if fixed.