Can't bind to 'fittext' since it isn't a known property of 'p' - I have properly installed ng2-fittext #109
Labels
No labels
bug
dependencies
duplicate
enhancement
help wanted
invalid
investigation
question
release
spike
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: loke/ng2-fittext#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I am using Angular 18, and I am trying to use ng2-fittext for a small component below.
I have properly installed ng2-fittext, and imported it in my app.module.
package.json = "ng2-fittext": "^2.0.0",
app.module = import { Ng2FittextModule } from "ng2-fittext"; ... imports: [Ng2FittextModule]
Despite this, I still get the error "Can't bind to 'fittext' since it isn't a known property of 'p'." when trying to use the directives.
Can anyone help me?
Thank you in advance!
Probably is a misconfiguration in your project or a missing import somewhere, but in order to understand better your problem i need to replicate it in a sandbox.
Can you please share a stackblitz or a repository with the issue?
Thanks
Thank you for the quick response!
Unfortunately, I cannot share the entire repo as it is for work. Although, I have tried installing and using fittext for another local Angular project, and it works fine, so it must have something to do with the specific configuration of the project.
Might there be other packages that causes some conflict? Below is my entire package.json and app.module.
I figured it out - a silly mistake on my behalf.
I tried to use the directive in a component belonging in a shared module, and forgot to also put the import in the shared module.
Classic.
I apologize for the confusion and appreciate the reponse 🙏🏻
So, good news 🎉
Closing it