-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text doesn't update when it is changed dynamically (in js) #3
Comments
I have tweaked the code to allow for updating when variable is changed. It's working now but does include a watch on the variable in the child scope (which is still two-way binded to the parent variable). Code is in my forked repo: https://github.com/sdeering/ng-text-truncate/blob/master/ng-text-truncate.js |
Hi sdeering, thanks for pointing out the issue. I was quite busy in the last weeks so I've been postponing some updates to ng-text-truncate for some time. I'm taking a look at your solution and I should release a fix by the end of today... |
I've just pushed a fix. It's basically your idea, but with a cleaning of the element's contents before re-applying the truncate functions... |
Text doesn't update when it is changed dynamically (in js).
For example, if you have a button which updates the text (runs the changeText function below) then the text doesn't update even though it's value has changed on the scope. Is the value used for text still binded to the scope variable?
It looks like 2 way binding is implied on the scope but it's not working.
The text was updated successfully, but these errors were encountered: