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:
ExampleComponent
as 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_PIPES
has been renamed tocommonPipes
. -
The field
zone
inApplicationRef
has been removed from the API. -
The token
PLATFORM_INITIALIZERS
has 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_INITIALIZER
is now DEPRECATED. It was used sparingly,
and can easily be replaced by running functions in your root component with
an*ngIf
guard for initialization. -
Methods in lifecycle hooks have
void
return type. This is breaking change
if the override doesn't specify return type and usesreturn
without any
value. To fix add avoid
orFuture<void>
return type to the override:class MyComp implements OnInit { @override void ngOnInit() { // ... } }
-
Removed deprecated
ComponentResolver
class. -
Removed deprecated
componentFactories
andcomponentTypes
getters from
theApplicationRef
class. 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
@GenerateInjector
with aValueProvider
where 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
TokenReader
no 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
MemorizedForm
directive. 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
optionals
param fromControlGroup
constructor. This will soon be
replaced bydisabled
state for allControls
. See
#1037 for more details.
angular_router
2.0.0-alpha+9
Breaking changes
-
APP_BASE_HREF
was 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
, andOnDeactivate
should 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.