This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
4.0.0-alpha+1
matanlurey
released this
20 Jul 00:10
·
2836 commits
to master
since this release
4.0.0-alpha+1
New features
- Inheritence for both component and directive metadata is now complete! Any
field or method-level annotations (@Input
,@Output
,
@ViewChild|Children
,@ContentChild|Children
) are now inherited through
super types (extends
,implements
,with
) #231:
class BaseComponent {
@Input()
String name;
}
// Also has an input called "name" now!
@Component(selector: 'comp')
class ConcreteComponent extends BaseComponent {}
- Inputs that are of type
bool
now receive a default value oftrue
instead
of a value ofnull
or an empty string. This allows a much more HTML-friendly
syntax for your components:
<!-- All of these set a value of disabled=true -->
<fancy-button disabled></fancy-button>
<fancy-button [disabled]></fancy-button>
<fancy-button [disabled]="true"></fancy-button>
<!-- Value of disabled=false -->
<fancy-button [disabled]="false"></fancy-button>
@Component()
class FancyButton {
@Input()
bool disabled = false;
}
Breaking changes
- Removed
angular/common.dart
; replace imports withangular/angular.dart
. - Removed
angular/compiler.dart
; Compiler should only be invoked via the
transformers or viapkg:build
directly usingangular/source_gen.dart
. - Deprecated
@View()
annotation was completely removed. - Deprecated second parameter to
ExceptionHandler
was completely removed.
Bug fixes
- Fixed a bug where
@deferred
did not work nested inside of<template>
:
<template [ngIf]="someCondition">
<expensive-comp @deferred></expensive-comp>
</template>
-
ngForm
now allowsonSubmit
to be called with anull
value. -
Using
inputs|outputs
in the@Component
annotation to rename an existing
@Input()
or@Output()
now logs and fails the build during compilation. -
Symbol collisions with
dart:html
no longer cause a runtime exception, all
framework use ofdart:html
is now scoped behind a prefixed import.