0

is there a way to get an input value and retrieve if the value is highlighted? I've a simple input:

 <input type="text" id="myId" [(ngModel)]="myModel" (keypress)="myNumberInput($event)" min=0 max=99999/>

I'd should know throw event if the value in the input is highlighted. For example: enter image description here

Is it possible to get this information in event? Thanks

PS. I'm developing in Angular 2 so I need to do this without using jQuery.

bigskull
  • 541
  • 2
  • 18
  • 28
  • Possible duplicate of [jQuery get value of Highlighted characters in input field without using plugin](https://stackoverflow.com/questions/20526578/jquery-get-value-of-highlighted-characters-in-input-field-without-using-plugin) – James Douglas Aug 10 '17 at 16:11

1 Answers1

0

This is working for me :

<input type="text" id="myId" [(ngModel)]="myModel"  (select)="myNumberInput($event)" min=0 max=99999/>
Tejal
  • 471
  • 4
  • 10