BREAKING CHANGE:
A collection of all the form directives is exported
under `formDirectives`
while those were previously available
under `FormDirectives`.
Closes#1804
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.
BREAKING CHANGE:
Previously, `Directive` was the abstract base class of several directives.
Now, `Directive` is the former `Decorator`, and `Component` inherits from it.
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
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 #1477Closes#1592
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
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.
- 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
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#523close#1136
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, …
The `e2e_test` folder in `angular2` never contained e2e tests but was
used to store utilities for writing e2e/perf tests. A better place for
them is `angular2/src/test_lib`.
Closes#855
+ Precede the call to `new ReflectionCapabilities()` with our generated
code which populates the reflection map statically.
+ Add the import of our generated code.
+ Once we are generating all necessary code, we will remove the
import of reflection_capabilities.dart and the instantiation of
`ReflectionCapabilities`, cutting the dependency on dart:mirrors.
Closes#761
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.
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.
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
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’;
}
}
```
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'
`pub get` is now only executed when the `pubspec.yaml` in the `modules`
folder is different than the `pubspec.yaml` in the `build/dart` folder.
Generates the file `build/dart/_analyzer.dart` that imports all modules
to run `dart analyzer` against all of them. The build will fail whenever
there are errors, warnings or hints in `dart analyzer`.
Changes the sources so that `dart analyzer` does not report any
error, warning or hint.
Closes#40