Socket
Book a DemoInstallSign in
Socket

angular-autoselect

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-autoselect

AngularJS directive(s) to automatically select text within input fields

latest
Source
npmnpm
Version
0.3.3
Version published
Maintainers
1
Created
Source

angular-autoselect

AngularJS directive(s) to automatically select text within input fields.

Demo

Usage

Include this module:

angular.module('myModule', ['badwing.autoselect']);

Use the autoSelect directive:

<input type="text" ng-model="foo" auto-select="options"/>

Where options is an object with the following properties:

  • once {boolean}: If true, only auto-select once. Default false.
  • start {number}: If set, begin the selection at this index within the input field's value. Default 0.
  • end {number}: If set, end the selection at this index within the input field's value. Default is the length of the value.
  • match {(string|RegExp)}: If a string, select only the substring, if present. If a RegExp, then select all the text matched by the regular expression. If the directive cannot find the substring or the regular expression, it will not attempt to select text.

The autoSelect directive requires the ngModel directive.

Note: Not all input fields are supported by all browsers. Read about support.

Installation

$ npm install angular-autoselect

or

$ bower install angular-autoselect

angular-autoselect is a UMD module.

Author

Christopher Hiller

License

MIT

Keywords

angular

FAQs

Package last updated on 08 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.