refactor(core): move more modules into core

This commit is contained in:
Jeff Cross
2015-09-03 22:01:17 -07:00
parent 841aa1af5b
commit 6d13cf9b8f
47 changed files with 0 additions and 79 deletions
@@ -0,0 +1,27 @@
/**
* @module
* @description
* Change detection enables data binding in Angular.
*/
export {
ChangeDetectionStrategy,
ExpressionChangedAfterItHasBeenCheckedException,
ChangeDetectionError,
ChangeDetector,
Locals,
ChangeDetectorRef,
WrappedValue,
PipeTransform,
PipeOnDestroy,
IterableDiffers,
IterableDiffer,
IterableDifferFactory,
KeyValueDiffers,
KeyValueDiffer,
KeyValueDifferFactory
} from 'angular2/src/core/change_detection/change_detection';
+5
View File
@@ -0,0 +1,5 @@
export * from './src/core/debug/debug_element';
export {
inspectNativeElement,
ELEMENT_PROBE_BINDINGS
} from './src/core/debug/debug_element_view_listener';
+47
View File
@@ -0,0 +1,47 @@
/**
* @module
* @description
* The `di` module provides dependency injection container services.
*/
export {
InjectMetadata,
OptionalMetadata,
InjectableMetadata,
SelfMetadata,
HostMetadata,
SkipSelfMetadata,
DependencyMetadata
} from './src/core/di/metadata';
// we have to reexport * because Dart and TS export two different sets of types
export * from './src/core/di/decorators';
export {forwardRef, resolveForwardRef, ForwardRefFn} from './src/core/di/forward_ref';
export {
Injector,
ProtoInjector,
BindingWithVisibility,
DependencyProvider,
Visibility,
UNDEFINED
} from './src/core/di/injector';
export {
Binding,
BindingBuilder,
ResolvedBinding,
ResolvedFactory,
Dependency,
bind
} from './src/core/di/binding';
export {Key, KeyRegistry, TypeLiteral} from './src/core/di/key';
export {
NoBindingError,
AbstractBindingError,
CyclicDependencyError,
InstantiationError,
InvalidBindingError,
NoAnnotationError,
OutOfBoundsError
} from './src/core/di/exceptions';
export {OpaqueToken} from './src/core/di/opaque_token';
@@ -0,0 +1,3 @@
library angular2.di_transformer_dart;
export 'src/transform/di_transformer.dart';
+64
View File
@@ -0,0 +1,64 @@
/**
* @module
* @description
* Common directives shipped with Angular.
*/
import {CONST_EXPR, Type} from './src/core/facade/lang';
import {NgClass} from './src/core/directives/ng_class';
import {NgFor} from './src/core/directives/ng_for';
import {NgIf} from './src/core/directives/ng_if';
import {NgNonBindable} from './src/core/directives/ng_non_bindable';
import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from './src/core/directives/ng_switch';
export * from './src/core/directives/ng_class';
export * from './src/core/directives/ng_for';
export * from './src/core/directives/ng_if';
export * from './src/core/directives/ng_non_bindable';
export * from './src/core/directives/ng_style';
export * from './src/core/directives/ng_switch';
/**
* A collection of the Angular core directives that are likely to be used in each and every Angular
* application.
*
* This collection can be used to quickly enumerate all the built-in directives in the `@View`
* annotation. For example,
* instead of writing:
*
* ```
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
* selector: 'my-component'
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective]
* })
* export class MyComponent {
* ...
* }
* ```
* one could import all the core directives at once:
*
* ```
* import {CORE_DIRECTIVES} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
* selector: 'my-component'
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [CORE_DIRECTIVES, OtherDirective]
* })
* export class MyComponent {
* ...
* }
* ```
*
*/
export const CORE_DIRECTIVES: Type[] =
CONST_EXPR([NgClass, NgFor, NgIf, NgNonBindable, NgSwitch, NgSwitchWhen, NgSwitchDefault]);
+42
View File
@@ -0,0 +1,42 @@
/**
* @module
* @description
* This module is used for handling user input, by defining and building a {@link ControlGroup} that
* consists of
* {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used
* to read information
* from the form DOM elements.
*
* This module is not included in the `angular2` module; you must import the forms module
* explicitly.
*
*/
export {AbstractControl, Control, ControlGroup, ControlArray} from './src/forms/model';
export {AbstractControlDirective} from './src/forms/directives/abstract_control_directive';
export {Form} from './src/forms/directives/form_interface';
export {ControlContainer} from './src/forms/directives/control_container';
export {NgControlName} from './src/forms/directives/ng_control_name';
export {NgFormControl} from './src/forms/directives/ng_form_control';
export {NgModel} from './src/forms/directives/ng_model';
export {NgControl} from './src/forms/directives/ng_control';
export {NgControlGroup} from './src/forms/directives/ng_control_group';
export {NgFormModel} from './src/forms/directives/ng_form_model';
export {NgForm} from './src/forms/directives/ng_form';
export {ControlValueAccessor} from './src/forms/directives/control_value_accessor';
export {DefaultValueAccessor} from './src/forms/directives/default_value_accessor';
export {CheckboxControlValueAccessor} from './src/forms/directives/checkbox_value_accessor';
export {
NgSelectOption,
SelectControlValueAccessor
} from './src/forms/directives/select_control_value_accessor';
export {FORM_DIRECTIVES} from './src/forms/directives';
export {NG_VALIDATORS, Validators} from './src/forms/validators';
export {DefaultValidators} from './src/forms/directives/validators';
export {FormBuilder} from './src/forms/form_builder';
import {FormBuilder} from './src/forms/form_builder';
import {CONST_EXPR, Type} from './src/core/facade/lang';
export const FORM_BINDINGS: Type[] = CONST_EXPR([FormBuilder]);
+14
View File
@@ -0,0 +1,14 @@
/**
* @module
* @description
* This module provides advanced support for extending change detection.
*/
export {UpperCasePipe} from './src/core/pipes/uppercase_pipe';
export {LowerCasePipe} from './src/core/pipes/lowercase_pipe';
export {AsyncPipe} from './src/core/pipes/async_pipe';
export {JsonPipe} from './src/core/pipes/json_pipe';
export {DatePipe} from './src/core/pipes/date_pipe';
export {DecimalPipe, PercentPipe, CurrencyPipe} from './src/core/pipes/number_pipe';
export {LimitToPipe} from './src/core/pipes/limit_to_pipe';
export {DEFAULT_PIPES_TOKEN, DEFAULT_PIPES} from './src/core/pipes/default_pipes';