refactor: export core APIs from angular2/core
This change moves many APIs to the angular2/core export. This change also automatically adds FORM_BINDINGS in the application root injector. BREAKING CHANGE: Many dependencies that were previously exported from specific APIs are now exported from angular2/core. Affected exports, which should now be included from angular2/core include: angular2/forms angular2/di angular2/directives angular2/change_detection angular2/bootstrap (except for dart users) angular2/render angular2/metadata angular2/debug angular2/pipes Closes #3977
This commit is contained in:
@ -1,13 +1,15 @@
|
||||
import {isBlank, isPresent, isPromise, CONST, BaseException} from 'angular2/src/core/facade/lang';
|
||||
import {Observable, Promise, ObservableWrapper} from 'angular2/src/core/facade/async';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Promise, ObservableWrapper, Observable} from 'angular2/src/core/facade/async';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {
|
||||
ChangeDetectorRef,
|
||||
PipeOnDestroy,
|
||||
PipeTransform,
|
||||
WrappedValue
|
||||
} from 'angular2/src/core/change_detection';
|
||||
|
||||
import {PipeTransform, PipeOnDestroy, WrappedValue} from 'angular2/change_detection';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
import {ChangeDetectorRef} from 'angular2/change_detection';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
|
||||
class ObservableStrategy {
|
||||
createSubscription(async: any, updateLatestValue: any): any {
|
||||
|
@ -9,13 +9,13 @@ import {
|
||||
FunctionWrapper
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {DateFormatter} from 'angular2/src/core/facade/intl';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
// TODO: move to a global configable location along with other i18n components.
|
||||
var defaultLocale: string = 'en-US';
|
||||
|
@ -7,7 +7,7 @@ import {DatePipe} from './date_pipe';
|
||||
import {DecimalPipe, PercentPipe, CurrencyPipe} from './number_pipe';
|
||||
|
||||
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
|
||||
import {Binding, OpaqueToken} from 'angular2/di';
|
||||
import {Binding, OpaqueToken} from 'angular2/src/core/di';
|
||||
|
||||
const DEFAULT_PIPES_LIST = CONST_EXPR([
|
||||
AsyncPipe,
|
||||
@ -21,7 +21,7 @@ const DEFAULT_PIPES_LIST = CONST_EXPR([
|
||||
DatePipe
|
||||
]);
|
||||
|
||||
export const DEFAULT_PIPES_TOKEN = CONST_EXPR(new OpaqueToken("Default Pipes"));
|
||||
export const DEFAULT_PIPES_TOKEN: OpaqueToken = CONST_EXPR(new OpaqueToken("Default Pipes"));
|
||||
|
||||
export const DEFAULT_PIPES =
|
||||
export const DEFAULT_PIPES: Binding =
|
||||
CONST_EXPR(new Binding(DEFAULT_PIPES_TOKEN, {toValue: DEFAULT_PIPES_LIST}));
|
||||
|
@ -1,9 +1,7 @@
|
||||
import {isBlank, isPresent, Json, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {Injectable} from 'angular2/di';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
|
||||
/**
|
||||
* Implements json transforms to any object.
|
||||
|
@ -8,13 +8,11 @@ import {
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {Math} from 'angular2/src/core/facade/math';
|
||||
import {Injectable} from 'angular2/di';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
/**
|
||||
* Creates a new Array or String containing only a prefix/suffix of the
|
||||
* elements.
|
||||
|
@ -1,12 +1,10 @@
|
||||
import {isString, StringWrapper, CONST, isBlank} from 'angular2/src/core/facade/lang';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
/**
|
||||
* Implements lowercase transforms to text.
|
||||
*
|
||||
|
@ -10,14 +10,13 @@ import {
|
||||
FunctionWrapper
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/core/facade/intl';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
var defaultLocale: string = 'en-US';
|
||||
var _re = RegExpWrapper.create('^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Type} from 'angular2/src/core/facade/lang';
|
||||
import {Key, ResolvedBinding, Binding} from 'angular2/di';
|
||||
import {ResolvedFactory, resolveBinding} from 'angular2/src/core/di/binding';
|
||||
import {Key, ResolvedBinding, Binding} from 'angular2/src/core/di';
|
||||
import {PipeMetadata} from '../metadata/directives';
|
||||
|
||||
export class PipeBinding extends ResolvedBinding {
|
||||
|
@ -1,5 +1,12 @@
|
||||
import {isBlank, isPresent, BaseException, CONST, Type} from 'angular2/src/core/facade/lang';
|
||||
import {Injectable, OptionalMetadata, SkipSelfMetadata, Binding, Injector, bind} from 'angular2/di';
|
||||
import {
|
||||
Injectable,
|
||||
OptionalMetadata,
|
||||
SkipSelfMetadata,
|
||||
Binding,
|
||||
Injector,
|
||||
bind
|
||||
} from 'angular2/src/core/di';
|
||||
import {PipeBinding} from './pipe_binding';
|
||||
import * as cd from 'angular2/src/core/change_detection/pipes';
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
import {isString, StringWrapper, CONST, isBlank} from 'angular2/src/core/facade/lang';
|
||||
import {Injectable} from 'angular2/di';
|
||||
|
||||
import {PipeTransform, WrappedValue} from 'angular2/change_detection';
|
||||
import {Pipe} from 'angular2/src/core/metadata';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';
|
||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
|
||||
import {Pipe} from '../metadata';
|
||||
|
||||
/**
|
||||
* Implements uppercase transforms to text.
|
||||
*
|
||||
|
Reference in New Issue
Block a user