Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

5.0.0-alpha

Choose a tag to compare

@alorenzen alorenzen released this 10 Oct 21:28
· 2551 commits to master since this release

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 ComponentFactory and ComponentRef are now properly typed <T>
    where T is the type of the @Component-annotated class. Prior to this
    release, ComponentFactory did not have a type, and ComponentRef<T> was
    always ComponentRef<dynamic>.

Breaking changes

  • preserveWhitespace is now false by default in @Component. The old
    default behavior can be achieved by setting preserveWhitespace to true.

  • Classes annotated @Component can no longer be treated like services that
    were annotated with @Injectable(), and now fail when they are used within
    a ReflectiveInjector. Similar changes are planned for @Directive.

  • Removed inputs field from Directive. Inputs now must be declared using
    inline @Input annotations.

Bug fixes

  • Fixed a bug where injecting the Injector in a component/directive and
    passing a second argument (as a default value) always returned null. It
    now correctly returns the second argument (closes #626).

  • No longer invoke ExceptionHandler#call with a null exception.

  • Using Visibility.none no longer applies to providers directly on the
    @Component or @Directive; in practice this makes none closer to the
    local visibility in AngularDart v1, or self elsewhere in AngularDart;
    we might consider a rename in the future.

  • Fixed a bug where the hashcode of an item passed via ngFor changing would
    cause a strange runtime exception; while it is considered unsupported for
    a mutable object to have an overriden hashCode, we wanted the exception
    to be much better.

Refactors

  • The StylesheetCompiler is now a Builder, 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

  • @Component and @Directive annotated 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_inputs flag support to CompilerFlags, to speed up builds
    that use barback (i.e. pub transformers). By default in pub it 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 Module syntax.

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

Bug fix

  • Fixed event name for banana syntax [(name)] from nameChanged to
    nameChange.