8fa1539bac
This commit adds a plugin for the event manager, to allow a key name to be appended to the event name (for keyup and keydown events), so that the callback is only called for that key. Here are some examples: (keydown.shift.enter) (keyup.space) (keydown.control.shift.a) (keyup.f1) Key names mostly follow the DOM Level 3 event key values: http://www.w3.org/TR/DOM-Level-3-Events-key/#key-value-tables There are some limitations to be worked on (cf details in https://github.com/angular/angular/pull/1136) but for now, this implementation is reliable for the following keys (by "reliable" I mean compatible with Chrome and Firefox and not depending on the keyboard layout): - alt, control, shift, meta (those keys can be combined with other keys) - tab, enter, backspace, pause, scrolllock, capslock, numlock - insert, delete, home, end, pageup, pagedown - arrowup, arrowdown, arrowleft, arrowright - latin letters (a-z), function keys (f1-f12) - numbers on the numeric keypad (but those keys are not correctly simulated by Chromedriver) There is a sample to play with in examples/src/key_events/. close #523 close #1136 |
||
---|---|---|
docs | ||
modules | ||
scripts | ||
tools | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
Brocfile-js_dev.js | ||
CONTRIBUTING.md | ||
DEVELOPER.md | ||
LICENSE | ||
README.md | ||
bower.json | ||
gulpfile.js | ||
karma-dart.conf.js | ||
karma-js.conf.js | ||
karma.conf.js | ||
package.json | ||
perf-cloud-secret.template.js | ||
protractor-dart2js.conf.js | ||
protractor-js.conf.js | ||
protractor-shared.js | ||
pubspec.yaml | ||
test-init.dart | ||
test-main.dart | ||
test-main.js |
README.md
Angular
Angular is a development platform for building mobile and desktop web applications. This is the repository for Angular 2, both the JavaScript (JS) and Dart versions.
Angular 2 is currently in Alpha Preview. We recommend using Angular 1.X for production applications:
Setup & Install Angular 2
Follow the instructions given on the Angular download page.
Want to help?
Want to file a bug, or contribute some code or improve documentation? Excellent! Read up on our guidelines for contributing.
Examples
To see the examples, first build the project as described here.
Hello World Example
This example consists of three basic pieces - a component, a decorator and a
service. They are all constructed via injection. For more information see the
comments in the source modules/examples/src/hello_world/index.js
.
You can build this example as either JS or Dart app:
- JS:
$(npm bin)/gulp build.js.dev
, and$(npm bin)/gulp serve.js.dev
, and- open
localhost:8000/examples/src/hello_world/
in Chrome.
- Dart:
$(npm bin)/gulp serve/examples.dart
, and- open
localhost:8080/src/hello_world
in Chrome (for dart2js) or Dartium (for Dart VM).