5.0.0-alpha+5
angular
5.0.0-alpha+5
New features
-
Enables the new template parser by default. This parser is much stricter than
the old one, as it will detect things like missing closing tags or quotation
marks.If you need to turn it off temporarily, you need to set the following flag in
yourbuild.yaml
:
targets:
$default:
builders:
angular:
options:
use_new_template_parser: false
-
Requires
source_gen ^0.7.4+2
(was previously^0.7.0
). -
The compiler behind
initReflector()
has changed implementations and now
uses fully-scoped import statements instead of trying to figure out the
original scope (including import prefixes) of your source code. This is not
intended to be a breaking change.
Breaking changes
- We have removed the transformer completely from
angular
. It is now a
requirement that you usebuild_runner
to buildangular
.
For more details, see Building Angular.
-
QueryList
is now formally deprecated. Seedoc/deprecated_query_list.md
.
This feature is not compatible with future restrictions of Dart 2, because
QueryList
was always created as aQueryList<dynamic>
, even though users
expected it to be aQueryList<T>
. The new API is fully compatible. -
SlowCompinentLoader
is now formally deprecated. See
doc/component_loading.md
. This feature is not compatible with future
restrictions of AngularDart, because it requires collecting metadata and
disabling tree-shaking of classes annotated with@Component
. The newer API
is nearly fully compatible, is faster, and will be supported long-term. -
Explicitly remove support for
ngNonBindable
in the new template parser. -
Both
@Component.host
and@Directive.host
were deprecated several versions
back, but not properly, so warnings never appeared in IDEs. They are now
properly deprecated:
'Use @HostBinding() on a getter or @HostListener on a method'
. -
ElementRef
is now deprecated. InjectElement
orHtmlElement
instead.
This has unnecessary overhead on-top of the native DOM bindings without any
benefit.
Bug fixes
-
The experimental feature
@Injector.generate
now supports someconst
expressions in a Provider'suseValue: ...
. There are remaining known
issues with this implementation, anduseFactory
should be used instead if
you encounter issues. -
Fixed a bug where a
Injector.get
call whereInjector
is a
ReflectiveInjector
(which is also the injector most commonly used for both
the entrypoint and virtually every test) would throw
No provider found for X
, whereX
was a class or factory that was found
but one or more ofX
's dependencies were not found. We now correctly throw
No provider found for Y
(whereY
was that actual missing dependency). -
OpaqueToken<T>
was emitted asOpaqueToken<dynamic>
when you used nested
views (<div *ngIf="..."><comp></comp></div>
), and<comp>
was a component
or directive that@Inject
-ed a typed token (likeOpaqueToken<String>
);
this is now fixed. -
Trying to use
@{Content|View}Child{ren}
withElement
orHtmlElement
(fromdart:html
) caused a runtime exception, asElementRef
was passed
instead. The following now works:
@Component(
selector: 'uses-element',
template: '<div #div>1</div>'
)
class UsesElement {
@ViewChild('div')
// Could also be HtmlElement.
Element div;
angular_ast
0.4.3
- Maintenance release, supporting newer package versions.
angular_compiler
0.4.0-alpha+5
Bug fixes
linkTypeOf
correctly resolves bound types (i.e.<T>
) in most cases, and
can fallback todynamic
otherwise.
Breaking changes
-
Requires
source_gen ^0.7.4+2
(was previously^0.7.0
). -
linkToReference
now requires a second parameter, aLibraryReader
, and
treats private types (i.e. prefixed with_
) asdynamic
as the compiler
cannot point to them. -
ReflectableEmitter
has been completely replaced with a new implementation. -
Removed all references and use of determining a "prefix" of a type. This was
no longer used onceReflectableEmitter
was re-written. -
Removed a number of internal flags that were no longer strictly required.
angular_forms
1.0.1-alpha+5
Maintenance release, to support the latest package:angular alpha.
angular_router
2.0.0-alpha+5
New features
-
Added
Router.onNavigationStart
to notify subscribers when a navigation
request starts. -
Added the
routerProvidersTest
module for testing route configurations or
components with router dependencies.
Breaking changes
- Removed fuzzy arrow from
MockLocationStrategy
. It relied on Dart 1's
treatment of dynamic as bottom to mock handling ofpopstate
events without
actually relying ondart:html
. Since Angular must be tested in the browser
anyways, there's no incentive to avoid this dependency. As a consequence,
the signature ofMockLocationStrategy.onPopState
is now unchanged from
LocationStrategy.onPopState
.
angular_test
2.0.0-alpha+3
- Removed support for
pub run angular_test
. This is no longer strictly
needed, as it was just a convenience for running both the build system and
test runner. Similar functionality is supported out of the box by
build_runner
:
$ pub run build_runner test