Commit Graph

41 Commits

Author SHA1 Message Date
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
8faf6364dc refactor(core): remove DynamicComponent
BREAKING CHANGE:
A dynamic component is just a component that has no @View annotation…
2015-04-30 09:17:25 -07:00
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
fb67e37339 feat(decorators): adds decorators to be used by TS and Babel transpiled apps. 2015-04-29 15:13:25 -07:00
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
e3c11045bf fix(compiler): changed the compiler to set up event listeners and host properties on host view elements
Closes #1584
2015-04-29 05:27:45 +00:00
3d62546314 fix(compiler): only sets viewDefinition absUrl if the view has either a template or templateUrl
fixes #1326
closes #1327
2015-04-28 15:40:07 -07:00
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
4bab25b366 feat: alllow specifying directives as bindings
Related to #709
Closes #1498
2015-04-24 11:02:17 -07:00
8ccafb0524 feat(view): reimplemented property setters using change detection 2015-04-23 11:55:27 -07:00
f7f06c5ad4 chore: add more type annotations 2015-04-21 08:49:05 -07:00
ada1e642c5 feat(view): add imperative views 2015-04-20 17:18:44 -07:00
a00cb1de50 feat(Compiler): Make Compiler.buildRenderDirective() static. 2015-04-17 21:57:25 -07:00
de31aca7a7 docs(di): Edits to DI.
Closes #1420
2015-04-17 17:49:12 +00:00
923d90bce8 refactor(views): clean up creating views in place and extract view_hydrator
Major changes:
- `compiler.compileRoot(el, type)`
  -> `compiler.compileInHost(type) + viewHydrator.hydrateHostViewInPlace(el, view)`
- move all `hydrate`/`dehydrate` methods out of `View` and `ViewContainer` into
  a standalone class `view_hydrator` as private methods and provide new public
  methods dedicated to the individual use cases.

Note: This PR does not change the current functionality, only moves it
into different places.

See design discussion in #1351, in preparation for imperative views.
2015-04-16 11:58:01 -07:00
e819e97f9a docs: expose more API to public, document QueryList 2015-04-15 05:10:26 +00:00
f375dbd013 feat(dart/transform): Mark Compiler as Injectable
Necessary to allow runtime access via the `Injector`
2015-04-10 13:41:26 -07:00
bf7933714a chore(rename): rename View and Template concepts for #1244 2015-04-10 12:00:37 -07:00
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
ca958464c4 refactor(render): create and store render ProtoViewRef in every app ProtoView
Needed to change Renderer.mergeChildComponentProtoViews to not create
new ProtoViews to be able to deal with cyclic references.

This commit is part of using the new render layer in Angular.
2015-04-07 20:27:25 -07:00
1d4d18d9db refactor(render): user render compiler 2015-04-03 23:41:00 -07:00
86dc3e5b07 docs: create public API surface
Closes #1181
2015-04-02 23:23:39 +00:00
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
57723e1354 feat(di): Add the @Injectable annotation to Compiler
Mark `Compiler` and its dependencies as available to the `Injector`.
2015-03-17 22:12:47 -07:00
b69f3043e0 feat(compiler): added the DynamicComponent annotation 2015-03-17 15:23:58 -07:00
85799aa1a5 docs(*): add @publicModule tags
Initial set of tags to demonstrate the public docs filtering

Closes #988
2015-03-17 14:44:45 -07:00
70c875ee14 refactor(shadow dom): do not use injectors nor directives
This prepares us for the app/render split in the compiler.
2015-03-16 16:58:38 -07:00
c3873be295 fix(Compiler): asynchronous error reporting 2015-03-09 16:42:37 +01:00
9982520a23 refactor(Compiler): make shadow DOM stragegy support more flexible 2015-03-03 11:24:08 -08:00
bcf4a96a84 refactor(Compiler): simplify the code
Closes #862
2015-03-03 11:21:02 -08:00
757eae8ad3 feat(compiler): DOM adapters + html5lib implementation; misc fixes 2015-02-27 16:49:14 -08:00
929fc65493 refactor(template loading): add support for base URLs, css rewriting
fixes #654
2015-02-26 09:36:04 +01:00
94e203b9df feat(DirectiveParser): throw errors when expected directives are not present
closes #527
Closes #570
2015-02-24 20:57:21 -08:00
fa25965939 chore: Remove unused imports
Closes #624
2015-02-17 16:49:08 -08:00
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
74f92c6a79 perf(Compiler): use Promises only when strictly required 2015-02-10 09:13:21 +01:00
47042bc503 feature(ShadowDomTransformer): create a compiler step to transform the shadow DOM 2015-02-10 08:54:37 +01:00
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
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
3f228669d7 chore(packaging): update import for the new file structure 2015-02-05 15:47:12 -08:00
3820609f24 chore(packaging): move files to match target file structure 2015-02-05 15:46:13 -08:00