Posts by Paulo Cesar Ferreira Ribas • 1 point
1 post
-
-2
votes3
answers1243
viewsA: How to select the content of an input in ng-Focus?
app.directive('selectOnFocus', function ($window) { return { restrict: 'A', link: function (scope, element, attrs) { element.on('focus', function () { if (!$window.getSelection().toString()) { //…