4.0.0-alpha+2
angular
4.0.0-alpha+2
New features
- Added
ComponentLoader, a high-level imperative API for creating components
at runtime. It uses internal code-paths that already existed, and is much
more future proof.ComponentLoaderis usable within a@Directive(), an
@Component(), and injectable services.
// An `ExampleComponent`s generated code, including a `ComponentFactory`.
import 'example.template.dart' as ng;
class AdBannerComponent implements AfterViewInit {
final ComponentLoader _loader;
AdBannerComponent(this._loader);
@override
ngAfterViewInit() {
final component = _loader.loadDetached(ng.ExampleComponentNgFactory);
// Do something with this reference.
}
}-
You can now directly inject
dart:html'sElementorHtmlElementinstead
ofElementRef, which is "soft deprecated" (will be deprecated and removed
in a future release). -
findContainerhas now been exposed from NgForm allowing easier creation of
custom form implementations. -
setUpControlhas been exposed from the forms API to allow forms to setup
their controls easier.
Bug Fixes
- The transformer now fails if any unsupported arguments are passed in.
Performance
- Directives now generate their own change detector class (behind the scenes)
instead of the code being re-created into every component that uses a
directive.
Breaking changes
-
The router package is now being published separate as
package:angular_router
(not throughpackage:angular/router.dart). In the near future it will be
updated to a more Dart idiomatic "2.0" router, but for now it is an exact
replica of the previous router. -
Removed
@{Component|Directive}#queries. This is replable using the same
member-level annotation (i.e.@{Content|View}Child{ren}). -
DynamicComponentLoaderwas renamedSlowComponentLoaderto encourage users
to preferComponentLoader. Additionally, argumentsprojectableNodes:and
onDestroy:callbacks were removed - they were mostly unused, and confusing
since they were undocumented. -
Removed
angular/platform/browser_static.dart; replace imports with
angular/angular.dart. -
Removed
angular/platform/common_dom.dart; replace imports with
angular/angular.dart. -
Removed
angular/testing.dart; Useangular_testpackage instead. -
Removed
angular/platform/testing.dart. -
Removed
platform/testing/browser_static.dart. -
Removed
MockNgZone. -
Removed
ViewEncapsulation.native, which is no longer supported. -
Renamed
FORM_DIRECTIVEStoformDirectives.
angular_router
1.0.0
- Initial commit of
angular_router. This is just a port of the router that was
in the core angular package.
angular_test
1.0.0-beta+5
- Workaround for
pub {serve|build}hanging onangular_testas a dependency.
angular_compiler
0.2.0
- Added various classes and helpers to form the new compile infrastructure:
ComponentReaderDependencyReader,DependencyInvocation,DependencyElementProviderReader,ProviderElementTokenReader,TypeTokenElement,OpaqueTokenElementgetInheritanceHierarchy,urlOfReflectableReader,ReflectableOutput,ReflectableClass