5.0.0-alpha
angular
5.0.0-alpha
We are now tracking the Dart 2.0 SDK. It is not recommended to use the
5.0.0-alpha series of releases unless you are using a recent dev release of
the Dart SDK. We plan to exit an alpha state once Dart 2.0 is released.
If you are individually depending on angular_compiler, we require:
dependencies:
angular_compiler: '^0.4.0-alpha`New features
- Both
ComponentFactoryandComponentRefare now properly typed<T>
whereTis the type of the@Component-annotated class. Prior to this
release,ComponentFactorydid not have a type, andComponentRef<T>was
alwaysComponentRef<dynamic>.
Breaking changes
-
preserveWhitespaceis nowfalseby default in@Component. The old
default behavior can be achieved by settingpreserveWhitespacetotrue. -
Classes annotated
@Componentcan no longer be treated like services that
were annotated with@Injectable(), and now fail when they are used within
aReflectiveInjector. Similar changes are planned for@Directive. -
Removed
inputsfield fromDirective. Inputs now must be declared using
inline@Inputannotations.
Bug fixes
-
Fixed a bug where injecting the
Injectorin a component/directive and
passing a second argument (as a default value) always returnednull. It
now correctly returns the second argument (closes #626). -
No longer invoke
ExceptionHandler#callwith anullexception. -
Using
Visibility.noneno longer applies to providers directly on the
@Componentor@Directive; in practice this makesnonecloser to the
localvisibility in AngularDart v1, orselfelsewhere in AngularDart;
we might consider a rename in the future. -
Fixed a bug where the hashcode of an item passed via
ngForchanging would
cause a strange runtime exception; while it is considered unsupported for
a mutable object to have an overridenhashCode, we wanted the exception
to be much better.
Refactors
- The
StylesheetCompileris now aBuilder, and is being integrated as part
of the template code genreator instead of a separate build action. This will
let us further optimize the generated code.
Performance
- Types bound from generics are now properly resolved in a component when
inheriting from a class with a generic type. For example, the following used
to be untyped:
class Container<T> {
@Input()
T value;
}
class StringContainerComponent implements Container<String> {}angular_compiler
0.4.0-alpha
While technically a breaking change from 0.3.0, it will likely be safe for
most users to set bound constraints that include 0.4.0; this will allow users
of the 4.0.0 AngularDart release to utilize the new generator_inputs
optimization.
dependencies:
angular_compiler: '>=0.3.0 <0.5.0'Breaking changes
@Componentand@Directiveannotated classes are no longer@Injectable.
In practice this means they can no loger be provided as an implicit
const Provider(FooComponent)without either manually adding@Injectable
or refactoring your code. We found this didn't really affect users, and most
uses of components and directives in these lists were accidental.
New features
- Add
generator_inputsflag support toCompilerFlags, to speed up builds
that usebarback(i.e. pub transformers). By default inpubit assumed
that all files relative to the same package have the AngularDart transformer
run on them:
lib/
foo.dart
bar.dart
This used to asynchronously block and wait for generation to complete, but at
0.3.1 will instead infer that a relative import will eventually have a
generated file:
// foo.dart
import 'bar.dart';While this could be considered a breaking change, in practice it should be
breaking only if the $include or $exclude flags are being used to control
what files have the AngularDart generator run on them. In that case, the flag
can be controlled:
transformers:
- angular:
$include:
- lib/foo.dart
generator_inputs:
- lib/foo.dart # Only foo.dart, not bar.dart.
- lib/src/**.dart # But include everything else.- Started adding experimental support for a new
Modulesyntax.
Bug fixes
- Fix a bug in the outliner that did not the correct output extension.
angular_forms
1.0.1-alpha
- Support breaking changes in angular 5.0.0-alpha
angular_test
1.0.2-alpha
- Support breaking changes in angular 5.0.0-alpha
angular_ast
0.4.0-alpha+1
- New code location! angular_ast is now part of the angular mono-repo on
https://github.com/dart-lang/angular.
Bug fix
- Fixed event name for banana syntax
[(name)]fromnameChangedto
nameChange.