Monday 10 December 2018

javascript - DOM manipulation in Angular directive after sub view rendering

I need a directive that will truncate long text in element and show a popover with full text in case truncation take place.



See http://plnkr.co/edit/90WP5ISQHG7FXRpetucm?p=preview


For text truncation I've used CSS and it works well.
But when I'm trying to access element content I see {{str.data}} rather then exact text from the data.



I guess that I need even't that is fired after rendering, but I can't fing any suitable.



So my question how can I run my DOM manipulation after sub view get rendered?



The only solution I've found so far is using timeout, but I think that there is better solution for it.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...