95 Commits

Author SHA1 Message Date
Victor Berchet
09092b269c fix(ElementBinderBuilder): allow a directive to have mutliple bindings
fix #320
2015-01-07 09:33:29 +01:00
Victor Berchet
7027674081 fix(compiler): fix a typo in BIND_NAME_REGEXP 2015-01-07 09:31:52 +01:00
Misko Hevery
0866485f95 perf: Traverse dom using firstChild instead of childNodes
5% improvement in speed by not using childNodes DOM API.
2015-01-06 13:16:57 -08:00
vsavkin
53906e484a fix(compiler): fix a dart analyzer warning 2014-12-30 13:25:18 -08:00
vsavkin
739f624cc8 refactor(change_detection): add change_detection library file 2014-12-29 15:20:42 -08:00
vsavkin
f06433fb58 feat(test_lib): implement SpyObject 2014-12-29 13:27:17 -08:00
vsavkin
a37950293a cleanup(core): fix dart analyzer warnings 2014-12-29 12:12:11 -08:00
vsavkin
da9d041f90 feat(view): add support for components that use shadow dom emulation 2014-12-29 11:42:34 -08:00
Tobias Bosch
df4ac0dd33 refactor(perf): use webdriver to execute benchmarks
- use performance log of chromedriver / appium to get timeline data
  for calculating metrics for benchmarks
- change all benchmarks to be made of a standalone application
  and a protractor test that collectes timeline data
- fix and simplify benchmarks
- add dart2js to build
- remove benchpress

Closes #330
2014-12-23 22:22:55 -08:00
vsavkin
dbd85615b0 style(core): add missing type annotation 2014-12-17 15:58:20 -08:00
vsavkin
df21c3c77d feat(zone): add support for long stack traces 2014-12-17 14:56:54 -08:00
vsavkin
d5fcac4d7a feat(compiler): pass compilation unit to the parser 2014-12-12 18:52:53 -08:00
vsavkin
cf8a5d2a0d cleanup(zones): cleanup 2014-12-12 15:24:30 -08:00
vsavkin
2184150905 feat(bootstrap): use VmTurnZone and LifeCycle to bootstrap an application 2014-12-12 15:24:30 -08:00
vsavkin
0b550f9695 feat(LifeCycle): change LifeCycle to be able register it with a zone 2014-12-12 15:24:30 -08:00
vsavkin
df36ffb11d feat(zone): add initial implementation of VmTurnZone 2014-12-12 15:24:30 -08:00
Rado Kirov
60456c8b89 feat(ng-repeat): initial implementaion of ng-repeat.
- adds support for content bindings via '[]'.
- directives module
2014-12-11 11:23:02 -08:00
Tobias Bosch
3ec3d5e084 perf(view): inline and refactor view instantiation and hydration
- Don’t convert DOM array into JS array via `Array.slice`
- Inline static methods for instantiation and hydration
- Misc cleanup

Closes #291
2014-12-09 16:16:45 -08:00
vsavkin
8acf9fb609 feat(change_detection): ensure that expression do not change after they have been checked 2014-12-08 18:51:19 -08:00
Victor Berchet
ee36063fae style: misc minor changes 2014-12-08 21:59:59 +01:00
Victor Berchet
c362f33fe4 style(Change Detection): rename WatchGroupDispatcher to ChangeDispatcher 2014-12-08 21:59:59 +01:00
Tobias Bosch
72b970e4e2 fix(core): export ViewPort in the public exports 2014-12-08 12:00:47 -08:00
Tobias Bosch
9329c0e8bc fix(application): also bind the root component to the injector 2014-12-08 12:00:47 -08:00
Tobias Bosch
9c2d411450 feat(compiler): allow recursive components 2014-12-08 12:00:43 -08:00
vsavkin
984ff9bf1b cleanup(view): remove unused code 2014-12-05 19:06:11 -08:00
vsavkin
33b47bd5d4 fix(view): fix DirectivePropertyGroupMemento to return a new group instead of null 2014-12-05 19:01:16 -08:00
Rado Kirov
174613067c feat(views): adds (de)hydration of views and template vars.
Dehydrated views are views that are structurally fixed, but their
directive instances and viewports are purged.

Support for local bindings is added to the view.
2014-12-04 22:40:51 -08:00
vsavkin
847cefcb7b feat(change_detector): notify directives on property changes 2014-12-03 14:33:52 -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
Tobias Bosch
7bc282d15e feat(viewport): add initial integration test for template directives 2014-12-01 16:39:37 -08:00
Tobias Bosch
0758165fb5 fix(compiler): allow identifiers with - in the template bindings as keys. 2014-12-01 16:39:36 -08:00
Tobias Bosch
63053438ea fix(compiler): always wrap views into an own <template> element
This is needed to allow view instantiation also in browsers that
don’t support the `<template>` element and because of this would
return elements from the content of `<template>` elements when
using `element.querySelectorAll`.

Also stores the `elementBinder.nestedProtoView` correctly
when a template directive was used on a `<template>` element.
2014-12-01 16:39:36 -08:00
Victor Berchet
0703ee526c fix(Dart1.8): fix analyzer warnings 2014-12-01 21:17:16 +01:00
vsavkin
6f889e3094 feat(di): add OpaqueToken to DI
Using `new Object()` as a token causes cryptic errors. OpaqueToken class should be used instead.
2014-11-26 12:52:16 -08:00
Rado Kirov
c6f14dd833 feat(viewPort): adds initial implementation of ViewPort.
ViewPort is the mechanism backing @Template directives. Those
directives can use the viewport to dynamically create, attach and
detach views.
2014-11-25 16:19:50 -08:00
vsavkin
bfd3c2d5a9 fix(reflection): update pubspec.yaml to add a missing dependency on reflection 2014-11-24 18:03:26 -08:00
vsavkin
6e8175a816 feat(Reflection): extract reflection capabilities into a separate module 2014-11-24 16:53:12 -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
vsavkin
2980eb5b0b refactor(ChangeDetector): rename WatchGroup into RecordRange 2014-11-20 10:24:18 -08:00
Tobias Bosch
fc5b7edca4 feat(compiler): support on- and [] 2014-11-19 16:24:12 -08:00
Tobias Bosch
c6846f1163 feat(compiler): new semantics for template attributes and view variables.
- Supports `<div template=“…”>`, including parsing the expressions within
  the attribute.
- Supports `<template let-ng-repeat=“rows”>`
- Adds attribute interpolation (was missing previously)
2014-11-19 14:32:15 -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
Rado Kirov
1221857d17 feat(bootstraping): application bootstrapping implementation.
Entry-point to bootstrapping is a rootComponent. The bootstrapping
method, uses the component's selector to find the insertion element in
the DOM, and attaches the component in its ShadowRoot.
2014-11-18 15:02:38 -08:00
vsavkin
f0d6464856 feat(ChangeDetector): change View to construct a WatchGroup hierarchy 2014-11-17 17:49:17 -08:00
Tobias Bosch
b2ecdb5da7 fix(compiler): use parentheses around expressions and escape quotes 2014-11-17 17:47:50 -08:00
Tobias Bosch
03882dcccc refactor(ElementInjector): remove stale file and make StaticKeys private 2014-11-17 17:44:39 -08:00
Rado Kirov
be4cb2db3a feat(view): add support for instantiation of nested component views.
Include shadowDom creation and integration tests for nested components.

Fix accidentally clobbered modules/core/test/compiler/view_spec.js by
previous commit.
2014-11-14 16:09:36 -08:00
Tobias Bosch
b07ea6b90e feat(compiler): add benchmarks
- compileEmptyTemplate
- compile25ElementsNoBindings
- compile25ElementsWithBindings

For the results see the PR #197.

Closes #197
2014-11-14 14:25:02 -08:00
vsavkin
d7208b8429 feat(ElementInjector): add NgElement 2014-11-14 13:22:39 -08:00
vsavkin
ac8351b7bc feat(ElementInjector): change ElementInjector so @parent and @ancestor do not include self. 2014-11-14 13:18:39 -08:00