5.3.0
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.provideTypeOptionalandInjector.provideTokenOptional. -
The compiler now optimizes string bindings inside
NgForloops. -
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
keyupandkeydownevent bindings now ignore
synthetic events (e.g. those triggered by a mouse click) instead of throwing
aTypeError. -
#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,beforeComponentCreatednow runs withinNgZone
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.skipannotation has no corresponding@i18ndescription, instead of
throwing an unhandled error.
Breaking changes
-
Removed
castCallback2ForDirectivefrommeta.dart. In practice this was
not used. We also deprecatedcastCallback1ForDirectivenow 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 aViewRefinstead of an
EmbeddedViewRef.For context,
ViewContainerRefsupports inserting both host views (created
viaComponentFactory) and embedded views (created viaTemplateRef).
Today,EmbeddedViewRefcan 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
-
OnChangesis now officially deprecated. Please useAfterChangesinstead.- If you don't use the
changesmap 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 thevaluesetter and
then checked inngAfterChanges. - If you are making extensive use of the
changesmap, then consider
recreating the map manually.
- If you don't use the
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.defernow supports an optionalprefetcherparameter
which can be defined to prefetch additional resources that are dependent on
the matchedRouterState. -
The
RouteDefinitionsubclassesDeferredRouteDefinition,
RedirectRouteDefinition, andComponentRouteDefinitionare now exported
frompackage: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
popstateevents will now update the
browser location if the resulting navigation matches a redirecting route or
is transformed by aRouterHookimplementation.
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 registeredExceptionHandlerrather than thrown.