5.0.0-alpha+9
angular
5.0.0-alpha+9
New features
-
Static properties and methods of a component may now be referenced without a
receiver in the component's own template.Before:
ExampleComponentas receiver is necessary.@Component( selector: 'example', template: '<h1>{{ExampleComponent.title}}</h1>', ) class ExampleComponent { static String title; }
After: No receiver is necessary.
@Component( selector: 'example', template: '<h1>{{title}}</h1>', ) class ExampleComponent { static String title; }
Breaking changes
-
The field
COMMON_PIPEShas been renamed tocommonPipes. -
The field
zoneinApplicationRefhas been removed from the API. -
The token
PLATFORM_INITIALIZERShas been removed. This was used sparingly to
run functions before the application was started, but can just as easily be
converted into running functions inmain()before. -
The token
APP_INITIALIZERis now DEPRECATED. It was used sparingly,
and can easily be replaced by running functions in your root component with
an*ngIfguard for initialization. -
Methods in lifecycle hooks have
voidreturn type. This is breaking change
if the override doesn't specify return type and usesreturnwithout any
value. To fix add avoidorFuture<void>return type to the override:class MyComp implements OnInit { @override void ngOnInit() { // ... } }
-
Removed deprecated
ComponentResolverclass. -
Removed deprecated
componentFactoriesandcomponentTypesgetters from
theApplicationRefclass. These were used internally by the legacy router
and were not intended to be parts of the public API.
Bug fixes
-
String literals bound in templates now support Unicode escapes of the form
\u{?-??????}. This enables support for Unicode supplementary planes, which
includes emojis! -
Using
@GenerateInjectorwith aValueProviderwhere the value is either a
top-level function or static-class method no longer crashes.
Internal cleanup
- Template normalization in the compiler now uses the newer template parser
based onpackage:angular_ast. There is no flag to enable the old behavior
but please reach out if you see issues in this release.
angular_ast
0.5.0
-
BREAKING CHANGE: We no longer support parsing Dart expressions as part
of parsing the template AST. We hope to re-add some support for this by
migrating the existing parser inpackage:angular, but we are likely not to
have a stable API for some time. -
BREAKING CHANGE: Deleted
ExpressionParserVisitor(related to above).
angular_compiler
0.4.0-alpha+9
Breaking changes
TokenReaderno longer supports arbitrary const objects or literals.
Bug Fixes
- Fixed a bug where the compiler crashed after resolving a bound type failed.
angular_forms
2.0.0-alpha+1
New Features
- Add
MemorizedFormdirective. This is a form that will not remove controls
if the control is taken out of the view, for example with a [NgIf].
Breaking Changes
- Remove
optionalsparam fromControlGroupconstructor. This will soon be
replaced bydisabledstate for allControls. See
#1037 for more details.
angular_router
2.0.0-alpha+9
Breaking changes
-
APP_BASE_HREFwas removed in favor ofappBaseHref. -
When navigating to and from the same implementation of
CanReuse, if it
returns true, the implementation will remain attached to the DOM.
Previously, components were unconditionally detached from the DOM on
navigation, and reusable components would simply be reattached.This may be a change to the scroll behavior of your components, as
temporarily removing reused components from the DOM could reset the scroll
position if no other content was present.
Bug fixes
CanNavigate,CanDeactivate, andOnDeactivateshould now always be
invoked on the active instance of a component rather than the instance
created during route resolution. This previously could occur when navigating
away and back to a nested route whose parent was not reusable.
angular_test
2.0.0-alpha+7
- Maintenance release, supporting newer package versions.