Commit Graph

153 Commits

Author SHA1 Message Date
David-Emmanuel Divernois 8fa1539bac feat(keyEvents): support for <div (keyup.enter)="callback()">
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
2015-04-10 13:29:27 +02:00
vsavkin f45281a10a feat(view): generalized loading of dynamic components 2015-04-09 22:15:42 -07:00
Tobias Bosch 50098767fc refactor(render): use render layer fully
Introduces angular2/src/core/compiler/ViewFactory which
extracts ProtoView.instantiate and replaces ViewPool.

Note: This is a work in progress commit to unblock other commits.
There will be follow ups to add unit tests, remove TODOs, …
2015-04-08 20:51:31 -07:00
Tobias Bosch 1d4d18d9db refactor(render): user render compiler 2015-04-03 23:41:00 -07:00
Tobias Bosch c1aa65239e refactor(render): move services to render folder
property_setter_factory
selector
style_inliner
style_url_resolver
shadow_css
2015-04-02 14:40:49 -07:00
Tobias Bosch 4f56628566 refactor(render): move services to right location
core/compiler/events -> render/dom/events
core/compiler/url_resolver -> services/url_resolver
core/compiler/xhr/* -> services/*
2015-04-02 10:35:27 -07:00
Julie Ralph e81e5fb2b9 feat(testability): add an initial scaffold for the testability api
Make each application component register itself onto the testability
API and exports the API onto the window object.
2015-04-01 13:54:06 -07:00
vsavkin b09624024b example(forms): added a example of using forms 2015-03-26 11:36:14 -07:00
Victor Berchet 65d759316b fix(PrivateComponentLoader): add the loader to the app injector
fixes #1063
2015-03-24 22:10:26 +01:00
gdi2290 b61b8d60b7 refactor(forEach): change to for-of with iterable
rename: foreach -> for
rename: array -> iterable
update: DartParseTreeWriter
update: naive_infinite_scroll
update: todo
fix: tests in foreach_spec

Closes #919
2015-03-21 14:19:21 -07:00
vsavkin 906fba4fab fixed imports 2015-03-19 10:52:16 -07:00
Tim Blasi 014a28fef0 fix(examples): Fix type registration in hello_world
Fixing `registerType` call for `Content` in index_static.js.

Closes #991
2015-03-17 22:13:07 -07:00
Tim Blasi 153cee1244 feat(di): Modify hello_world to use @Injectable
Mark `GreetingService` as available to `Injector`s.

Closes #986
2015-03-17 22:12:47 -07:00
David East afda43dc02 feat(examples): Add TodoMVC sample application. 2015-03-13 19:28:59 +01:00
Victor Berchet 951a808e0e refactor(PropertySetter): use the global reflector 2015-03-12 19:49:34 +01:00
Rado Kirov dd3e6271c2 chore(services): rename services.
Closes #711
2015-03-11 18:30:37 -07:00
Rado Kirov f1593ebca5 feat(shadowdom): turn on ShadowDom Emulated Mode by default.
Closes: #526
2015-03-11 12:46:15 -07:00
Victor Berchet b349c35678 feat(ElementInjector): implement @PropertySetter
relates to #621
2015-03-09 18:28:39 +01:00
Victor Berchet 03793d0714 feat(CssProcessor): add support for CssTransformers
Closes #860
2015-03-03 11:24:08 -08:00
Victor Berchet 9982520a23 refactor(Compiler): make shadow DOM stragegy support more flexible 2015-03-03 11:24:08 -08:00
Victor Berchet 009e11a6be fix: Static DI init 2015-02-26 19:31:44 +01:00
Victor Berchet 929fc65493 refactor(template loading): add support for base URLs, css rewriting
fixes #654
2015-02-26 09:36:04 +01:00
Victor Berchet 1376e49ea0 fix(Injector): fix dependencies in static injectors
Closes #784
2015-02-25 09:52:56 -08:00
Yegor Jbanov d1f03e509b fix(benchpress): benchpress fixes and a smoke test for Dart 2015-02-23 10:50:51 -08:00
Pawel Kozlowski 709c3ca6b5 refactor: use the ExceptionHandler service
Fixes #533
Closes #672
2015-02-18 13:48:28 +01:00
Victor Berchet e6c8bde808 feat(Compiler): Multiple template per component
fixes #596

- TemplateConfig becomes Template
- introduce a TemplateResolver to pick the cmp template,
- @Component and @Template are disociated
2015-02-13 18:07:08 +01:00
Victor Berchet 6d23d00057 refactor(ViewPort): @Template -> @Viewport, ViewPort -> ViewContainer
fixes #595
2015-02-13 17:48:27 +01:00
Victor Berchet 8844671c8d feat(EventManager): implement the EventManager 2015-02-12 10:46:11 +01:00
Yegor Jbanov 234e1eccca chore(sourcemaps): add e2e test 2015-02-11 15:07:13 -08:00
Victor Berchet 746f85a621 feat(compiler, ShadowDom): adds TemplateLoader using XHR.
Also adds css shimming for emulated shadow dom and makes the shadowDom
strategy global to the application.
2015-02-05 19:47:29 -08:00
Yegor Jbanov 3f228669d7 chore(packaging): update import for the new file structure 2015-02-05 15:47:12 -08:00
Tobias Bosch 05ffdc9b44 refactor(build): explicitly mention `src` folder in imports
Export files are now directly under the module folder,
e.g. `core/core.js`. With this, an import like `core/core`
won’t need a path mapping (e.g. via `System.paths`) any more.
This adds the `src` folder to all other import statements as well.
2015-02-05 11:55:48 -08:00
vsavkin 850cf0fef4 feat(change_detection): implement a change detector generator 2015-01-27 16:18:15 -08:00
Rado Kirov ec5cb3eb66 feat(package): introduce a catch-all package angular.
modules/angular has no implementation, but depends on all the pieces
that make angular - core, di, directives, etc. It is the package that
all client apps will depend on.
2015-01-23 10:31:24 -08:00
Rado Kirov af02f2beb1 fix(e2e): adds events to hello world static.
Extends e2e test to cover events.
2015-01-14 18:00:27 -08:00
Rado Kirov c5b0baf805 feat(view): adds event binding to view instantiation.
Only native non-bubbling events are supported by the commit.
2015-01-13 21:12:52 -08:00
vsavkin 739f624cc8 refactor(change_detection): add change_detection library file 2014-12-29 15:20:42 -08:00
Victor Berchet 90daca02cf fix(examples.dart): initialize the reflector
fixes #309
2014-12-18 11:11:18 +01:00
Victor Berchet 75549a660c fix(examples.dart): add LifeCycle to the reflector 2014-12-18 11:11:18 +01:00
Tobias Bosch 9c2d411450 feat(compiler): allow recursive components 2014-12-08 12:00:43 -08:00
Tobias Bosch 8db77f2405 refactor(build): simplify and modularize
simplify:
- use same html file for dart and JS
- build benchmarks automatically when doing `gulp build`
- centralize configuration

modularize:
- move all build tasks into separate node.js modules under
  `tools/build`.

changes:
- the `build` folder is now the `dist` folder

Closes #284
2014-12-05 16:30:36 -08:00
Rado Kirov c59cc8631a feat(examples): adds static dart hello world example.
Use gulp examples/pub.serve to start up the server and go to
http://localhost:8080/index_static.html to see the static app.
2014-12-03 10:58:30 -08:00
Pawel Kozlowski 95d86d151a fix(example): correct markup in the hello world example 2014-12-01 15:13:02 -08:00
Uri Shaked 3e57189e45 fix(examples): fix hello_world example (js)
Added missing path mapping for the new reflection module.
2014-11-26 14:14:18 -08:00
Misko Hevery 044625a098 chore: Make field declarations explicit
This used to be valid code:

```
class Foo {
  constructor() {
    this.bar = ‘string’;
  }
}
```

This will now fail since ‘bar’ is not explicitly
defined as a field. We now have to write:

```
class Foo {
  bar:string; // << REQUIRED
  constructor() {
    this.bar = ‘string’;
  }
}
```
2014-11-24 16:35:39 -08:00
Rado Kirov 70c38e6260 doc(example): adds comments to the hello world app.
Explains the basic concepts as seen in the demo app, but it is not a
substitute for proper documentation which will come later.
2014-11-20 12:32:30 -08:00
Rado Kirov d6193e9073 feat(examples): adds hello-world app.
The app is writen in ES6 and transpiles to ES5 and dart as part of the
usual build.

The app contains a component, a directive and a services wired together
through dependency injection.

Before Each:
- gulp build

For es5:
- gulp serve
- open 'localhost:8000/js/examples/lib/hello_world/'

For dart:
- gulp examples/pub.serve
- open 'localhost:8080'
2014-11-19 12:24:14 -08:00
Alxandr cb276fe412 Fixed small typo in example
Closes #165
2014-11-07 16:20:38 -08:00
Vojta Jina 2b7738c12c fix(example): make it work 2014-11-05 11:19:02 -08:00
Tobias Bosch d42fa07863 fix(examples): make todo example run again 2014-09-26 17:38:38 -07:00
Misko Hevery 8afa421d75 first chunk of interfaces that are valid via dart analyzer 2014-09-25 13:51:50 -07:00
Tobias Bosch 57b3297bf6 refactor: always use js2dart traceur and make examples run again 2014-09-24 20:20:59 -07:00
Tobias Bosch afa7616464 build - refactor 2014-09-19 13:59:28 -07:00