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

5.3.0

Compare
Choose a tag to compare
@alorenzen alorenzen released this 05 Apr 17:55
· 769 commits to master since this release

angular

5.3.0

New features

  • The template compiler issues a warning if a component that does not project
    content has children. Previously, these nodes were created and never
    attached. Now the nodes are not created at all.

  • Specialized interpolation functions for Strings.

  • Optimization: Removes toString() calls of interpolated strings bound to
    properties.

  • The compiler now uses superclass information to determine immutability.

  • Added Injector.provideTypeOptional and Injector.provideTokenOptional.

  • The compiler now optimizes string bindings inside NgFor loops.

  • The compiler now adds type information to local variables in nested NgFor
    loops.

  • The compiler now includes source locations to errors in annotations on class
    members.

  • The compiler now optimizes change detection for HTML Text nodes.

  • Disabled an optimization around pure-HTML DOM nodes wrapped in a *ngIf. In
    practice this optimization only kicked in for a few views per application
    and had a high runtime cost as well as a high overhead for the framework
    team. We have added and expect to add additional optimizations around the
    size of generated views.

Bug fixes

  • The template compiler now outputs the full path to a template file when it
    reports an error.

  • #1694: Composite keyup and keydown event bindings now ignore
    synthetic events (e.g. those triggered by a mouse click) instead of throwing
    a TypeError.

  • #1669: Fixed a regression which prevented a pipe invoked with more than
    two arguments from being passed as an argument to a function.

  • The compiler emits source locations for errors in Dart files when using an
    AnalysisDriver.

  • Internationalized attribute, property, and input bindings will now properly
    escape characters in the message that would invalidate the generated string
    (such as \n, $, and '). This behavior is now consistent with
    internationalized text and HTML.

  • The template compiler no longer crashes on HTML attributes ending in ":"

  • When querying for a directive present in multiple embedded views (portions
    of the template controlled by a structural directive such as *ngIf) with
    @ViewChildren(), the directives in the resulting list are now in the same
    order as they appear in the template. Prior to this fix, directives in
    nested embedded views would occur before those in their parent view.

  • The template compiler now properly updates class statements for "literal
    attributes". Previously, we did not shim these classes correctly. This
    includes both raw attributes (e.g. class="foo") and host bindings (e.g.
    @HostBinding('class')).

  • The presence of a query (e.g. @ContentChild(TemplateRef)) no longer causes
    any matching <template> references to become available for dynamic
    injection (i.e. injector.provideType(TemplateRef)).

  • The template compiler now properly updates class bindings on SVG elements.
    Previously, we did not shim these classes correctly.

  • When using runAppAsync, beforeComponentCreated now runs within NgZone
    which previously surfaced bugs when services created and initialized in this
    callback did not trigger change detection.

  • The style sheet compiler will no longer emit invalid Dart code when a style
    sheet is placed within a directory whose name is not a valid Dart
    identifier.

  • The template compiler will now report a helpful error message when an
    @i18n.skip annotation has no corresponding @i18n description, instead of
    throwing an unhandled error.

Breaking changes

  • Removed castCallback2ForDirective from meta.dart. In practice this was
    not used. We also deprecated castCallback1ForDirective now that the
    directiveTypes: [ ... ] feature is live.

  • Removed deprecated AppViewUtils.resetChangeDetection(). This method was
    never intended to be used in the public API, and is no longer used by our
    own infra.

  • Using anything but ChangeDetectionStrategy.{Default|OnPush} is considered
    deprecated, as they were not intended to be publicly accessible states.
    See the deprecation messages for details.

  • ViewContainerRef.get() now returns a ViewRef instead of an
    EmbeddedViewRef.

    For context, ViewContainerRef supports inserting both host views (created
    via ComponentFactory) and embedded views (created via TemplateRef).
    Today, EmbeddedViewRef can reference either kind of view, but in the
    future it will only reference the latter, for which its methods are actually
    relevant (for example setting locals has no purpose on host views). This
    change is in preperation for when a host view reference may not implement
    EmbeddedViewRef.

Deprecations

  • OnChanges is now officially deprecated. Please use AfterChanges instead.

    • If you don't use the changes map at all, just remove the parameter and
      you're good to go.
    • If you are only tracking the change of one or two fields, consider using a
      boolean, i.e. valueChanged, which can be set in the value setter and
      then checked in ngAfterChanges.
    • If you are making extensive use of the changes map, then consider
      recreating the map manually.

angular_test

2.3.0

New Features

  • Added support for periodic timers in FakeTimeNgZoneStabilizer.

angular_forms

2.1.2

  • Maintenance release to support Angular 5.3.

angular_router

2.0.0-alpha+22

New features

  • RouteDefinition.defer now supports an optional prefetcher parameter
    which can be defined to prefetch additional resources that are dependent on
    the matched RouterState.

  • The RouteDefinition subclasses DeferredRouteDefinition,
    RedirectRouteDefinition, and ComponentRouteDefinition are now exported
    from package:angular_router/testing.dart.

Bug fixes

  • Deferred route loaders and prefetchers are no longer called a second time
    when matched during route resolution.

  • Navigation requests triggered by popstate events will now update the
    browser location if the resulting navigation matches a redirecting route or
    is transformed by a RouterHook implementation.

angular_compiler

0.4.3

  • FormatExceptions thrown while parsing modules in InjectorReader are now
    rethrown as BuildErrors with source information.

  • The InjectorReader will fail earlier in the compile process on parse errors.

  • Unhandled errors from InjectorReader are now caught and reported with source
    information.

  • BuildError now has factory constructors to create errors for annotations and
    elements.

angular_ast

0.5.9

  • Errors caused by parsing an invalid micro expression (i.e. *ngFor) are now
    reported to the registered ExceptionHandler rather than thrown.