refactor: rename annotations to metadata
BREAKING CHANGE (maybe) Well as long as our customers use public API this should not be a breaking change, but we have changed import structure as well as internal names, so it could be breaking. import: angular2/annotations => angular2/metadata Classes: *Annotations => *Metadata renderer.DirectiveMetadata => renderer.RendererDirectiveMetadata renderer.ElementBinder => renderer.RendererElementBinder impl.Directive => impl.DirectiveMetadata impl.Component => impl.ComponentMetadata impl.View => impl.ViewMetadata Closes #3660
This commit is contained in:
committed by
Miško Hevery
parent
5e6317fecc
commit
ea6673947c
@@ -0,0 +1,97 @@
|
||||
library angular2.src.core.metadata;
|
||||
|
||||
import "package:angular2/src/facade/collection.dart" show List;
|
||||
import "./metadata/di.dart";
|
||||
import "./metadata/directives.dart";
|
||||
import "./metadata/view.dart";
|
||||
|
||||
export "./metadata/di.dart";
|
||||
export "./metadata/directives.dart";
|
||||
export "./metadata/view.dart";
|
||||
|
||||
/**
|
||||
* See: [DirectiveMetadata] for docs.
|
||||
*/
|
||||
class Directive extends DirectiveMetadata {
|
||||
const Directive({String selector, List<String> properties,
|
||||
List<String> events, Map<String, String> host,
|
||||
List<LifecycleEvent> lifecycle, List bindings, String exportAs,
|
||||
bool compileChildren: true})
|
||||
: super(
|
||||
selector: selector,
|
||||
properties: properties,
|
||||
events: events,
|
||||
host: host,
|
||||
lifecycle: lifecycle,
|
||||
bindings: bindings,
|
||||
exportAs: exportAs,
|
||||
compileChildren: compileChildren);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [ComponentMetadata] for docs.
|
||||
*/
|
||||
class Component extends ComponentMetadata {
|
||||
const Component({String selector, List<String> properties,
|
||||
List<String> events, Map<String, String> host,
|
||||
List<LifecycleEvent> lifecycle, List bindings, String exportAs,
|
||||
bool compileChildren, List viewBindings, String changeDetection})
|
||||
: super(
|
||||
selector: selector,
|
||||
properties: properties,
|
||||
events: events,
|
||||
host: host,
|
||||
lifecycle: lifecycle,
|
||||
bindings: bindings,
|
||||
exportAs: exportAs,
|
||||
compileChildren: compileChildren,
|
||||
viewBindings: viewBindings,
|
||||
changeDetection: changeDetection);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [ViewMetadata] for docs.
|
||||
*/
|
||||
class View extends ViewMetadata {
|
||||
const View({String templateUrl, String template, dynamic directives,
|
||||
dynamic pipes, ViewEncapsulation encapsulation, List<String> styles,
|
||||
List<String> styleUrls})
|
||||
: super(
|
||||
templateUrl: templateUrl,
|
||||
template: template,
|
||||
directives: directives,
|
||||
pipes: pipes,
|
||||
encapsulation: encapsulation,
|
||||
styles: styles,
|
||||
styleUrls: styleUrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [PipeMetadata] for docs.
|
||||
*/
|
||||
class Pipe extends PipeMetadata {
|
||||
const Pipe({name}) : super(name: name);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [AttributeMetadata] for docs.
|
||||
*/
|
||||
class Attribute extends AttributeMetadata {
|
||||
const Attribute(String attributeName) : super(attributeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [QueryMetadata] for docs.
|
||||
*/
|
||||
class Query extends QueryMetadata {
|
||||
const Query(dynamic /*Type | string*/ selector, {bool descendants: false})
|
||||
: super(selector, descendants: descendants);
|
||||
}
|
||||
|
||||
/**
|
||||
* See: [ViewQueryMetadata] for docs.
|
||||
*/
|
||||
class ViewQuery extends ViewQueryMetadata {
|
||||
const ViewQuery(dynamic /*Type | string*/ selector, {bool descendants: false})
|
||||
: super(selector, descendants: descendants);
|
||||
}
|
||||
Reference in New Issue
Block a user