Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

4.0.0-alpha+1

Compare
Choose a tag to compare
@matanlurey 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 of true instead
    of a value of null 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 with angular/angular.dart.
  • Removed angular/compiler.dart; Compiler should only be invoked via the
    transformers or via pkg:build directly using angular/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 allows onSubmit to be called with a null 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 of dart:html is now scoped behind a prefixed import.