Search code examples
angulartypescriptnpm

Cant bind Angular custom NPM package


Hi guys i have created my custom dynamic tooltip npm package but when I use that package in an app, I get this error

  Can't bind to 'appDynamicTooltip' since it isn't a known property of 'div'.<div class="class-tooltip" [appDynamicTooltip]="tooltipData" [tooltipConditions]="conditions">

Now this is a common angular error that we face when the imports are not correct but my import is just one module and it was successfully imported inside my app and I can view the module. what I'm trying to figure out is if there is something wrong with my package the way I'm exporting it maybe?.
Here is the GitHub link to my Package dynamic-tooltip
Here is how I have imported my Package
enter image description here


Solution

  • As Pieterjan mentioned in the comments this solved my issue @Input('appDynamicTooltip') tooltipData: any I should denote the input within the directive with the selector from which i send the data That is when i use the directive i should use it like this [appDynamicTooltip]="tooltipData"