lentschi / ngx-ellipsis

Multiline text with ellipsis for angular 9+
MIT License
96 stars 22 forks source link

Warning #2

Closed GitHubish closed 6 years ago

GitHubish commented 6 years ago

Hi,

I have warnings when using the directive. Do you have an idea ?

ellipsis.directive.js:117 No such ellipsis-resize-detection strategy: 'undefined' - Using'element-resize-detector' instead

Thank you

lentschi commented 6 years ago

Ah, you're right - I'm sorry. It shouldn't give you that warning... The ellipsis-resize-detection attribute is optional, and it's only telling you what method it's using by default (which it shouldn't do as long as you're not using an incorrect value). I will fix this as soon as possible. In the mean time you can just add ellipsis-resize-detection (without attribute value) to your dom node to make the warning go away.

GitHubish commented 6 years ago

Oh ok thank you very much! I will wait patiently fix, this warning is not a problem on my side

lentschi commented 6 years ago

@GitHubish Please don't close the issue before I fixed it, or else I may forget about it ;-)

lentschi commented 6 years ago

@GitHubish The incorrect warning should disappear in v1.0.7 (-> Just run npm update ngx-ellipsis --save in your project dir.)

GitHubish commented 6 years ago

Thanks for the fix and sorry for closing the issue by mistake. I disabled the ellipsis on my project for now, I had a performance problem adding it when there were more than forty elements.

kukac7 commented 6 years ago

i have a similar issue.

https://stackblitz.com/edit/angular-dsatok

lentschi commented 6 years ago

@kukac7 Hm... Yes, I can see the error when I open the stackblitz page.

However, I don't, when I create a new angular 5 project locally and embed the package. You too should be able to run it locally and build it for any production server:

bash

git clone https://github.com/lentschi/ngx-ellipsis-angular5-demo.git
cd ngx-ellipsis-angular5-demo
npm install
npm run build # -> gives me a working minified production version in ./dist
npm run start # -> shows the demo at http://localhost:4200/

So I assume, it must have something to do with how stackblitz imports it. This may be worth a new issue, I'll look into it, as soon as I can find the time!