Commit Graph

99 Commits

Author SHA1 Message Date
Kevin Moore 7844e3a275 chore: dartfmt Dart code in the repo 2015-05-11 09:50:33 -07:00
yjbanov 66f5e30d7c chore(dart): use --trust-type-annotations and --trust-primitives 2015-05-08 16:13:53 -07:00
Jeremy Elbourn 8ef183b593 feat(material): add early version of md-grid-list.
Closes #1683
2015-05-08 13:29:24 -07:00
Jeremy Elbourn ad23921814 feat(material): early version of md-input
Closes #1753
2015-05-08 11:16:18 -07:00
Jeremy Elbourn 20a033e4c9 chore(material): add simple e2e smoke tests for components. 2015-05-07 15:13:30 -07:00
Kevin Moore 649e276610 chore: support last dev build of Dart at 1.10.0-dev.1.10
Can revert once 1.11 is available
2015-05-06 18:21:46 -07:00
Kevin Moore 5ef11774c2 chore: update pubspec files
Allow latest analyzer version
Add an upper constraint to the Dart SDK
2015-05-06 17:55:03 -07:00
Jeremy Elbourn f88c4b77ca feat(material): add prototype dialog component w/ demo. 2015-05-04 16:43:15 -07:00
Rado Kirov 457c15cd6c feat(decorators): adds decorator versions of DI annotations.
In 'angular2/di' the symbol:
- Inject is a decorator
- InjectAnnotation is an annotation

Internally one an get a hold of annotations without *Annotations appened
(to make ts2dart work without workarounds) by importing from
'angular2/src/di/annotations_impl' instead of 'angular2/di'. This is
needed only for users that transpile through TS and through ts2dart.
2015-05-04 13:35:09 -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
Tobias Bosch ead21c91a4 fix(exception_handler): log errors via `console.error`
This is e.g. needed as we use this to test for errors
in our examples.
2015-04-30 11:45:34 -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
Rado Kirov fb67e37339 feat(decorators): adds decorators to be used by TS and Babel transpiled apps. 2015-04-29 15:13:25 -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
Tim Blasi 726fecbfb6 feat(dart/transform): Turn on transform for examples/todo
- Tag services with `@Injectable()`
- Update `pubspec.yaml` to transform examples/todo.

Closes #1527
2015-04-28 23:38:08 +00:00
Jeremy Elbourn b9eab463f7 chore(): fix host properties for MD components. 2015-04-28 10:48:03 -07:00
Kevin Moore 7551a28f1a chore: show dart2js package warnings for angular2, benchmarks, examples
Closes #1468
2015-04-21 16:22:49 -07:00
Julie Ralph fa1ec48549 chore(example): fix TODO example on dart
Reflection for Dart was not set up properly for the TODO example,
so it was failing when served on dartium via
gulp serve/examples.dart
2015-04-21 10:17:26 -07:00
Tim Blasi 00e2d70f05 refactor(dart/transform): Remove index_static from hello_world
index_static.js & index_static.html are unnecessary in Js and are now
essentially generated via the Dart transformer. The angular
transformer is specified in examples/pubspec.yaml; use pub build to
create a transformed application that does not use dart:mirrors.

Create index_dynamic.js & index_dynamic.html, which are used to test
that the app runs equally well with mirrors and without.

Closes #495
2015-04-17 16:11:48 -07:00
Yegor Jbanov e52d71060f chore(analysis): fix analyzer warning in index_static 2015-04-17 14:01:42 -07:00
Yegor Jbanov 3dc4df2ffa chore(analysis): analyze web folders; fix existing warnings 2015-04-17 13:52:02 -07:00
Tobias Bosch f830cfca12 refactor(view): provide ViewContainers dynamically on any element 2015-04-17 12:35:59 -07:00
vsavkin 5408abca68 refactor(change_detection): removed global change detection objects so it is possible to override pipe registry 2015-04-16 15:57:45 -07:00
vsavkin 233cb0f96a feat(view): changed event emitters to be observables 2015-04-16 14:44:14 -07:00
Tobias Bosch 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
Jeremy Elbourn f149ae79c6 feat(material): first ng2 material design components 2015-04-14 16:15:35 -07:00
Tobias Bosch e34146fc14 fix(view_factory): fix caching of views
Previous implementation had bugs, and did not cache per ProtoView.
2015-04-10 16:57:45 -07:00
Tim Blasi 2cab7c79c3 feat(dart/transform): Allow multiple transformer entry points
- Allow the user to specify multiple entry points to an app.
- Allow the Angular 2 transformer to run without explicit entry points to
generate necessary setters & getters on built-in directives like `For`
and `If`.

Closes #1246
2015-04-10 13:41:26 -07:00
Pawel Kozlowski bf7933714a chore(rename): rename View and Template concepts for #1244 2015-04-10 12:00:37 -07:00
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
Caitlin Potter 9d21a6f40d chore(package.json): upgrade traceur to v0.0.87
Fix in source-map test to follow through the sourcemap chain.
2015-03-26 18:37:03 -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
vsavkin 75ecaf02b9 chore: upgrade guinness to remove a workaround in testlib 2015-03-13 18:19:10 -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
Tobias Bosch e1a1dd07e4 fix(test): add `v8` category to server spec 2015-03-11 16:35:23 -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