How can I manage focus states on an Angular 2 custom input component? -


i cannot find way manage through angular 2 how custom input gets focus label (and for attribute) , how manage states.

i'm trying give same focus-and-blur behaviour regular has. ideas on that?

thanks!

html have tabindex attribute, makes element focusable. http://w3c.github.io/html/editing.html#the-tabindex-attribute

then in component can listen focus event:

 @hostbinding('tabindex') tabindex = -1;   @hostlistener('focus')  focushandler() {    alert('focused!');  } 

Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -