AndersDJohnson / ng-click-select

:mouse: Click-to-select inputs for Angular.

Home Page:https://AndersDJohnson.github.io/ng-click-select/example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ng-click-select

This branch is for Angular 2. For Angular 1.x, see the 1.x branch.

Angular directive to select contents of text input or text area elements when clicked. Useful to allow user to easily copy value into their clipboard without a Flash-based solution like ZeroClipboard.

See demo.

Also available at ngModules.org.

In The Wild

These projects use ng-click-select:

Install

Depends on Angular 2.

Via Bower:

$ bower install --save ng-click-select#2

Then include src/ng-click-select.js in your page.

And/or add it as a dependency of your module, e.g.:

import NgClickSelect from 'src/ng-click-select';

@Component({
  /* ... */
})
@View({
  template: '<input type="text" ng-click-select />',
  directives: [NgClickSelect]
})
class NgClickSelectExample {
  /* ... */
}

Examples

Inputs

<input type="text" ng-click-select />

Textareas

<textarea class="ng-click-select"></textarea>

Build

npm i
tsd reinstall
npm run tsc

About

:mouse: Click-to-select inputs for Angular.

https://AndersDJohnson.github.io/ng-click-select/example/

License:MIT License


Languages

Language:TypeScript 60.6%Language:JavaScript 20.5%Language:HTML 19.0%