58 Commits

Author SHA1 Message Date
Tobias Bosch
c68fa27444 refactor(render): remove recursion from renderer
The goal is to make implementing a renderer straight forward.

BREAKING_CHANGE:

- Renderer interface was redone / simplified.
- `DirectDomRenderer` was replaced by `DomRenderer`.
- `DirectDomRenderer.setImperativeComponentRootNodes` is replaced
  by the following 2 steps:
    1. `ViewManager.getComponentView(elementRef) -> ViewRef`
    2. `DomRenderer.setComponentViewRootNodes(viewRef, rootNodes)`
- all `@View` annotations need to have a template, but the template
  may be empty. Previously views that had a `renderer` property did
  not have to have a `template`.
- `dynamicComponentLoader.loadIntoNewLocation` does no more allow
  to pass an element, but requires a css selector.
  Special syntax: `:document` can be used as prefix to search globally
  on the document instead of in the provided parent view.

Part of #1675
2015-05-08 09:37:41 -07:00
vsavkin
e4342743c0 feat(benchmark): added an implementation of the tree benchmark in React 2015-04-30 18:12:21 -07:00
Tobias Bosch
f75a50c1dd refactor(compiler): rename decorator directives into directive
BREAKING CHANGE:
Previously, `Directive` was the abstract base class of several directives.
Now, `Directive` is the former `Decorator`, and `Component` inherits from it.
2015-04-30 13:38:40 -07:00
Rado Kirov
87dcd5eb6f fix(decorators): updates missing benchmark and fixes typo. 2015-04-30 10:22:30 -07:00
Tobias Bosch
3aac2fefd7 refactor(compiler): remove Viewport directives, use Decorator instead
BREAKING_CHANGE:
- The special type of `Viewport` directives is removed
  in favor of a more general `Decorator` directive
- `ViewContainerRef` now no more has a default `ProtoViewRef`
  but requires an explicit one when creating views.

Closes #1536
2015-04-29 15:59:55 -07:00
Tobias Bosch
09f8d8f7ba refactor(core): introduce ViewRef and ProtoViewRef
BREAKING CHANGES:
- `NgElement` merged into `ElementRef`
- `Compiler.compile…` returns `ProtoViewRef`
- `ViewContainer` uses `ProtoViewRef`s and `ViewRef`s.
- `ViewRef`/`ProtoViewRef` in renderer were renamed to
  `RenderViewRef`/`RenderProtoViewRef`.

Related to #1477
Closes #1592
2015-04-29 14:03:38 -07:00
Tobias Bosch
6dece68bb8 refactor(core): rename ViewContainer to ViewContainerRef
This also renames InternalAppViewContainer into AppViewContainer

Related to #1477
Closes #1554
2015-04-27 10:12:21 -07:00
Tobias Bosch
bfa381b35a refactor(view): introduce AppViewManager to consolidate logic
AppViewManager is the single entry point to changing the view hierarchy.
It is split between the manager itself which does coordination and
helper methods, so both are easily testable in isolation.

Also, ViewContainer is now only a pure reference to a bound element
with the previous functionality but does not contain the list of views
any more.

Part of #1477
2015-04-24 20:26:18 -07:00
Yegor Jbanov
3dc4df2ffa chore(analysis): analyze web folders; fix existing warnings 2015-04-17 13:52:02 -07:00
vsavkin
6f8fef4f13 feat(bootstrap): changed bootstrap to return ComponentRef 2015-04-10 18:14:59 -07:00
Tobias Bosch
6ce085a21a feat(benchmark): make view cache a parameter to the tree benchmark 2015-04-10 16:57:46 -07:00
Tim Blasi
82127571b5 feat(dart/transform): Use the Dart transformer for benchmarks
Remove explicit generation of reflection information in benchmark code
and generate it with the transformer.
2015-04-10 14:01:55 -07:00
Pawel Kozlowski
bf7933714a chore(rename): rename View and Template concepts for #1244 2015-04-10 12:00:37 -07: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
Victor Berchet
65d759316b fix(PrivateComponentLoader): add the loader to the app injector
fixes #1063
2015-03-24 22:10:26 +01:00
Pawel Kozlowski
0fb9f3bd6c fix(ElementBinderBuilder): properly bind to web component properties
Fixes #776

Closes #1024
2015-03-22 14:14:36 +01:00
Victor Berchet
951a808e0e refactor(PropertySetter): use the global reflector 2015-03-12 19:49:34 +01: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
Tobias Bosch
81a5ae8f6e fix(build): report and fail on errors
tree benchmark was broken and we didn’t know it…

also changes reporting to not include messages from `console.time()`, …
2015-03-02 16:34:32 -08:00
Yegor Jbanov
757eae8ad3 feat(compiler): DOM adapters + html5lib implementation; misc fixes 2015-02-27 16:49:14 -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
Alex Eagle
56906db4d5 fix es6 compilation for Element.remove.
Use DOM facade to delete an Element since the remove method is only in Dart.
2015-02-25 15:56:08 -08:00
Victor Berchet
1376e49ea0 fix(Injector): fix dependencies in static injectors
Closes #784
2015-02-25 09:52:56 -08:00
Victor Berchet
8a3d9050d9 feat(TreeBenchmark): use angular2 If directive 2015-02-20 20:53:44 +01:00
Pawel Kozlowski
56f4e84d45 fix: flip attr / property bind in directives annotations
Fixes #648

Closes #684
2015-02-18 17:07:53 +01: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
Rado Kirov
7bf5ab8f43 feat(view_pool): adds a view pool of dehydrated views per protoview. 2015-02-09 22:17:38 -08:00
Tobias Bosch
f39c6dc2c7 fix(setup): use upstream traceur with explicit patches
Also correct the transpile to ES6

Also support generics correctly

All patches are hooked in via `/tools/transpiler/index.js`
https://github.com/google/traceur-compiler/issues/1700
https://github.com/google/traceur-compiler/issues/1699
https://github.com/google/traceur-compiler/issues/1708
https://github.com/google/traceur-compiler/issues/1625
https://github.com/google/traceur-compiler/issues/1706
2015-02-06 17:04:08 -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
vsavkin
9957c1338e feat(change_detection): reimplement change detection 2015-01-21 14:21:14 -08:00
Tobias Bosch
d02c0accbb refactor(benchmarks): add cloud reporter, add params
- adds console and cloud reporter (via Google BigQuery).
- makes parameters of tests explicit and modifiable.
- removes `detect` and `ignoreGc` mode from benchpress
  as these can result in unstable numbers.
2015-01-15 09:09:05 -08:00
Rado Kirov
bccc863567 fix(benchmark): remove duplicate line. 2015-01-13 21:09:28 -08:00
Misko Hevery
f6ebaf74d3 perf: force GC on profiles 2015-01-13 13:06:17 -08:00
vsavkin
abf03401df make dart analyzer happy 2015-01-13 11:14:05 -08:00
Misko Hevery
bed4b52a63 perf: Change baseline benchmark to be more consistent with the Angular 2015-01-12 21:58:19 -08:00