This repository was archived by the owner on Sep 16, 2022. It is now read-only.
4.0.0-alpha+1
·
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
boolnow receive a default value oftrueinstead
of a value ofnullor 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:builddirectly usingangular/source_gen.dart. - Deprecated
@View()annotation was completely removed. - Deprecated second parameter to
ExceptionHandlerwas completely removed.
Bug fixes
- Fixed a bug where
@deferreddid not work nested inside of<template>:
<template [ngIf]="someCondition">
<expensive-comp @deferred></expensive-comp>
</template>-
ngFormnow allowsonSubmitto be called with anullvalue. -
Using
inputs|outputsin the@Componentannotation to rename an existing
@Input()or@Output()now logs and fails the build during compilation. -
Symbol collisions with
dart:htmlno longer cause a runtime exception, all
framework use ofdart:htmlis now scoped behind a prefixed import.