angular-typewrite
angular-typewrite copied to clipboard
input type="text" ?
Hi Antonio,
I am trying to get the angular-typewrite directive work on a input textbox, but it's not working. Should it be working ?
I tried using it on a span and it works, except for the start attribute, I am trying to trigger a restart by changing the value on the start attribute. I have even tried to remove and add the start attribute on the span as well.
What I am trying to accomplish is, when the textbox have focus then the placeholder text is showing, but when the textbox is blured then typewriter should be restarted.
I am using angular 1.5.
Hope you can help med out.
Hi @n3tx ,
Currently there's no support for input tags. However the Use Case you're describing seems a bit particular. What I mean is that I guess you can accomplish your desired effect playing a bit with markup.
Have you tried playing with positioning absolutely a span with the directive and hide/show it depending on the state of the input focus/value?
Cheers
Hi Antonio,
thanks for your answer.
Yes, that's how I solved it.
But I still got problem with the start attribute, I can't start or stop it through code, only in markup.
I am using angular 1.5 (component) with TypeScript. Maybe is something with the scope.$watch ?
I have googled some, and it looks like angular 1.5 doesn't support watchers. So you have to use ng-change event to get it working in angular 1.5.
Thanks