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

5.0.0-alpha+4

Compare
Choose a tag to compare
@alorenzen alorenzen released this 18 Jan 23:36
· 2222 commits to master since this release

angular

5.0.0-alpha+4

  • We have a new template parser. This parser is much stricter than the old one,
    as it will detect things like missing closing tags or quotation marks.
    Enabling it will be a major breaking change, so we encourage you to try it out
    in this alpha release before we enable it by default in the next one.

    In order to use it, you need to set the following flag in your build.yaml:

builders:
  angular:
    options:
      use_new_template_parser: True
  • We now require code_builder ^3.0.0.

New features

  • Using OpaqueToken<T> and MutliToken<T> where T is not dynamic is
    now properly supported in all the different implementations of Injector. As
    a consequence relying on the following is now a breaking change:
// These used to be considered the same in some DI implementations.
const tokenA = const OpaqueToken<String>('a');
const tokenB = const OpaqueToken<dynamic('b');
  • Added a lifecycle event AfterChanges, which is similar to OnChanges, but
    with a much lower performance cost - it does not take any parameters and is
    suitable when you have multiple fields and you want to be notified when any
    of them change:
class Comp implements AfterChanges {
  @Input()
  String field1;

  @Input()
  String field2;

  @override
  void ngAfterChanges() {
    print('Field1: $field1, Field2: $field2');
  }
}

Breaking changes

  • ComponentRef.componentType throws an UnsupportedError, pending removal.
    This removes our last invocation of .runtimeType, which has potentially
    severe code-size implications for some apps.
  • The type of EmbeddedViewRef.rootNodes and ViewRefImpl.rootNodes has
    changed from List<dynamic> to List<Node>.

Bug fixes

  • Fixed a bug where Provider(T) was not correctly parsed as an implicit use
    of Provider(T, useClass: T).

angular_router

2.0.0-alpha+4

Breaking changes

  • Removed SpyLocation. MockLocationStrategy should be used instead.

Bug fixes

  • Prevented canDeactivate() from being invoked twice during redirection. It
    will now only be invoked with the redirected next router state, without also
    being invoked with the intermediate next router state.

  • Prevented canNavigate() from being invoked twice during redirection.

angular_forms

1.0.1-alpha+4

Maintenance release, to support the latest package:angular alpha.

angular_test

2.0.0-alpha+2

Maintenance release, to support the latest package:angular alpha.

angular_compiler

0.4.0-alpha+4

Breaking changes

  • ModuleReader.deduplicateProviders now returns a List not a Set, and
    providers that are multi are not removed, as it is a feature of the DI
    system to have multiple of them with the same token.

  • Add the TypeLink class, and replace uses of Uri.

  • Require code_builder ^3.0.0.

New features

  • Added typeArgumentOf helper method.

  • Added ReflectableEmitter.useCodeBuilder, which uses package:code_builder
    instead of an ad-hoc string-based output for Dart code. Once this passes the
    same suite of tests the original strategy will be removed.

Bug fixes

  • Prevented a RangeError that occurred when an invalid import lacked an
    extension.

  • ReflectorEmitter now supports MultiToken and generic-typed tokens, with
    some known limitations. See #782.

angular_ast

0.4.2

  • Supports the latest version of quiver.