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

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -