Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(typo): ngzone referencing misspelled api #3292

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 5 additions & 40 deletions modules/angular2/angular2.ts
Expand Up @@ -7,46 +7,11 @@ export {commonBootstrap as bootstrap} from 'angular2/src/core/application_common
// angular2_exports.ts. Re-exporting from angular2_exports.ts causes systemjs
// to resolve imports very very very slowly. See also a similar notice in
// bootstrap.ts
export * from 'angular2/annotations';
export * from 'angular2/core';

export {
DehydratedException,
ExpressionChangedAfterItHasBeenChecked,
ChangeDetectionError,

ON_PUSH,
DEFAULT,

ChangeDetectorRef,

Pipes,
WrappedValue,
Pipe,
PipeFactory,
NullPipe,
NullPipeFactory,
defaultPipes,
BasePipe,

Locals
} from './change_detection';

export * from './annotations';
export * from './change_detection';
export * from './core';
export * from './di';
export * from './forms';
export * from './directives';
export * from './http';
export {
RenderEventDispatcher,
Renderer,
RenderElementRef,
RenderViewRef,
RenderProtoViewRef,
RenderFragmentRef,
RenderViewWithFragments
} from 'angular2/src/render/api';
export {
DomRenderer,
DOCUMENT_TOKEN,
DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES
} from 'angular2/src/render/dom/dom_renderer';
export * from './forms';
export * from './render';
45 changes: 5 additions & 40 deletions modules/angular2/angular2_exports.ts
@@ -1,43 +1,8 @@
export * from 'angular2/annotations';
export * from 'angular2/core';

export {
DehydratedException,
ExpressionChangedAfterItHasBeenChecked,
ChangeDetectionError,

ON_PUSH,
DEFAULT,

ChangeDetectorRef,

Pipes,
WrappedValue,
Pipe,
PipeFactory,
NullPipe,
NullPipeFactory,
defaultPipes,
BasePipe,

Locals
} from './change_detection';

export * from './annotations';
export * from './change_detection';
export * from './core';
export * from './di';
export * from './forms';
export * from './directives';
export * from './http';
export {
RenderEventDispatcher,
Renderer,
RenderElementRef,
RenderViewRef,
RenderProtoViewRef,
RenderFragmentRef,
RenderViewWithFragments
} from 'angular2/src/render/api';
export {
DomRenderer,
DOCUMENT_TOKEN,
DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES
} from 'angular2/src/render/dom/dom_renderer';
export * from './forms';
export * from './render';
45 changes: 5 additions & 40 deletions modules/angular2/bootstrap.ts
Expand Up @@ -7,46 +7,11 @@ export {bootstrap} from 'angular2/src/core/application';
// angular2_exports.ts. Re-exporting from angular2_exports.ts causes systemjs
// to resolve imports very very very slowly. See also a similar notice in
// angular2.ts
export * from 'angular2/annotations';
export * from 'angular2/core';

export {
DehydratedException,
ExpressionChangedAfterItHasBeenChecked,
ChangeDetectionError,

ON_PUSH,
DEFAULT,

ChangeDetectorRef,

Pipes,
WrappedValue,
Pipe,
PipeFactory,
NullPipe,
NullPipeFactory,
defaultPipes,
BasePipe,

Locals
} from './change_detection';

export * from './annotations';
export * from './change_detection';
export * from './core';
export * from './di';
export * from './forms';
export * from './directives';
export * from './http';
export {
RenderEventDispatcher,
Renderer,
RenderElementRef,
RenderViewRef,
RenderProtoViewRef,
RenderFragmentRef,
RenderViewWithFragments
} from 'angular2/src/render/api';
export {
DomRenderer,
DOCUMENT_TOKEN,
DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES
} from 'angular2/src/render/dom/dom_renderer';
export * from './forms';
export * from './render';
58 changes: 15 additions & 43 deletions modules/angular2/change_detection.ts
Expand Up @@ -4,52 +4,24 @@
* Change detection enables data binding in Angular.
*/

export {
ASTWithSource,
AST,
AstTransformer,
AccessMember,
LiteralArray,
ImplicitReceiver
} from './src/change_detection/parser/ast';

export {Lexer} from './src/change_detection/parser/lexer';
export {Parser} from './src/change_detection/parser/parser';
export {Locals} from './src/change_detection/parser/locals';

export {
DehydratedException,
ExpressionChangedAfterItHasBeenChecked,
ChangeDetectionError
} from './src/change_detection/exceptions';
export {
ProtoChangeDetector,
ChangeDetector,
ChangeDispatcher,
ChangeDetection,
ChangeDetectorDefinition
} from './src/change_detection/interfaces';
export {
CHECK_ONCE,
CHECK_ALWAYS,
DETACHED,
CHECKED,
ON_PUSH,
DEFAULT
} from './src/change_detection/constants';
export {DynamicProtoChangeDetector} from './src/change_detection/proto_change_detector';
export {BindingRecord} from './src/change_detection/binding_record';
export {DirectiveIndex, DirectiveRecord} from './src/change_detection/directive_record';
export {DynamicChangeDetector} from './src/change_detection/dynamic_change_detector';
export {ChangeDetectorRef} from './src/change_detection/change_detector_ref';
export {Pipes} from './src/change_detection/pipes/pipes';
export {uninitialized} from './src/change_detection/change_detection_util';
export {WrappedValue, Pipe, PipeFactory, BasePipe} from './src/change_detection/pipes/pipe';
export {NullPipe, NullPipeFactory} from './src/change_detection/pipes/null_pipe';
export {
defaultPipes,
DynamicChangeDetection,
JitChangeDetection,
PreGeneratedChangeDetection,
preGeneratedProtoDetectors
} from './src/change_detection/change_detection';
DEFAULT,

ExpressionChangedAfterItHasBeenCheckedException,
ChangeDetectionError,

ChangeDetectorRef,

WrappedValue,
Pipe,
Pipes,
PipeFactory,
BasePipe,
NullPipe,
NullPipeFactory
} from 'angular2/src/change_detection/change_detection';
10 changes: 4 additions & 6 deletions modules/angular2/core.ts
Expand Up @@ -17,16 +17,14 @@ export {Compiler} from 'angular2/src/core/compiler/compiler';
export {AppViewManager} from 'angular2/src/core/compiler/view_manager';
export {IQueryList} from 'angular2/src/core/compiler/interface_query';
export {QueryList} from 'angular2/src/core/compiler/query_list';
export {DynamicComponentLoader} from 'angular2/src/core/compiler/dynamic_component_loader';

export {ElementRef} from 'angular2/src/core/compiler/element_ref';
export {TemplateRef} from 'angular2/src/core/compiler/template_ref';
export {RenderElementRef} from 'angular2/src/render/api';
export {ViewRef, ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
export {ViewRef, HostViewRef, ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
export {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';

export {
DynamicComponentLoader,
ComponentRef
} from 'angular2/src/core/compiler/dynamic_component_loader';
export {ComponentRef} from 'angular2/src/core/compiler/dynamic_component_loader';

export {NgZone} from 'angular2/src/core/zone/ng_zone';
export {Observable, EventEmitter} from 'angular2/src/facade/async';
18 changes: 12 additions & 6 deletions modules/angular2/render.ts
Expand Up @@ -4,9 +4,15 @@
* This module provides advanced support for extending dom strategy.
*/

export * from './src/render/dom/compiler/view_loader';
export * from './src/render/dom/shadow_dom/shadow_dom_strategy';
export * from './src/render/dom/shadow_dom/native_shadow_dom_strategy';
export * from './src/render/dom/shadow_dom/emulated_scoped_shadow_dom_strategy';
export * from './src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy';
export * from './src/render/api';
export {
RenderEventDispatcher,
Renderer,
RenderElementRef,
RenderViewRef,
RenderProtoViewRef,
RenderFragmentRef,
RenderViewWithFragments,
DomRenderer,
DOCUMENT_TOKEN,
DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES
} from './src/render/render';
37 changes: 37 additions & 0 deletions modules/angular2/src/change_detection/change_detection.ts
Expand Up @@ -19,6 +19,43 @@ import {Inject, Injectable, OpaqueToken, Optional} from 'angular2/di';
import {List, StringMap, StringMapWrapper} from 'angular2/src/facade/collection';
import {CONST, CONST_EXPR, isPresent, BaseException} from 'angular2/src/facade/lang';

export {
ASTWithSource,
AST,
AstTransformer,
AccessMember,
LiteralArray,
ImplicitReceiver
} from './parser/ast';

export {Lexer} from './parser/lexer';
export {Parser} from './parser/parser';
export {Locals} from './parser/locals';

export {
DehydratedException,
ExpressionChangedAfterItHasBeenCheckedException,
ChangeDetectionError
} from './exceptions';
export {
ProtoChangeDetector,
ChangeDetector,
ChangeDispatcher,
ChangeDetection,
ChangeDetectorDefinition
} from './interfaces';
export {CHECK_ONCE, CHECK_ALWAYS, DETACHED, CHECKED, ON_PUSH, DEFAULT} from './constants';
export {DynamicProtoChangeDetector} from './proto_change_detector';
export {BindingRecord} from './binding_record';
export {DirectiveIndex, DirectiveRecord} from './directive_record';
export {DynamicChangeDetector} from './dynamic_change_detector';
export {ChangeDetectorRef} from './change_detector_ref';
export {Pipes} from './pipes/pipes';
export {uninitialized} from './change_detection_util';
export {WrappedValue, Pipe, PipeFactory, BasePipe} from './pipes/pipe';
export {NullPipe, NullPipeFactory} from './pipes/null_pipe';


/**
* Structural diffing for `Object`s and `Map`s.
*/
Expand Down
@@ -1,7 +1,7 @@
import {isPresent, isBlank, BaseException, Type} from 'angular2/src/facade/lang';
import {List, ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {ProtoRecord} from './proto_record';
import {DehydratedException, ExpressionChangedAfterItHasBeenChecked} from './exceptions';
import {DehydratedException, ExpressionChangedAfterItHasBeenCheckedException} from './exceptions';
import {WrappedValue} from './pipes/pipe';
import {CHECK_ALWAYS, CHECK_ONCE, CHECKED, DETACHED, ON_PUSH} from './constants';

Expand Down Expand Up @@ -129,7 +129,7 @@ export class ChangeDetectionUtil {
}

static throwOnChange(proto: ProtoRecord, change) {
throw new ExpressionChangedAfterItHasBeenChecked(proto, change, null);
throw new ExpressionChangedAfterItHasBeenCheckedException(proto, change, null);
}

static throwDehydrated() { throw new DehydratedException(); }
Expand Down
6 changes: 4 additions & 2 deletions modules/angular2/src/change_detection/change_detector_ref.ts
Expand Up @@ -5,10 +5,12 @@ import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
* Controls change detection.
*
* {@link ChangeDetectorRef} allows requesting checks for detectors that rely on observables. It
*also allows detaching and
* attaching change detector subtrees.
* also allows detaching and attaching change detector subtrees.
*/
export class ChangeDetectorRef {
/**
* @private
*/
constructor(private _cd: ChangeDetector) {}

/**
Expand Down
24 changes: 23 additions & 1 deletion modules/angular2/src/change_detection/exceptions.ts
@@ -1,14 +1,31 @@
import {ProtoRecord} from './proto_record';
import {BaseException} from "angular2/src/facade/lang";

export class ExpressionChangedAfterItHasBeenChecked extends BaseException {
/**
* An error thrown if application changes model breaking the top-down data flow.
*
* Angular expects that the data flows from top (root) component to child (leaf) components.
* This is known as directed acyclic graph. This allows Angular to only execute change detection
* once and prevents loops in change detection data flow.
*
* This exception is only thrown in dev mode.
*/
export class ExpressionChangedAfterItHasBeenCheckedException extends BaseException {
constructor(proto: ProtoRecord, change: any, context: any) {
super(`Expression '${proto.expressionAsString}' has changed after it was checked. ` +
`Previous value: '${change.previousValue}'. Current value: '${change.currentValue}'`);
}
}

/**
* Thrown when an expression evaluation raises an exception.
*
* This error wraps the original exception, this is done to attach expression location information.
*/
export class ChangeDetectionError extends BaseException {
/**
* Location of the expression.
*/
location: string;

constructor(proto: ProtoRecord, originalException: any, originalStack: any, context: any) {
Expand All @@ -18,6 +35,11 @@ export class ChangeDetectionError extends BaseException {
}
}

/**
* Thrown when change detector executes on dehydrated view.
*
* This is angular internal error.
*/
export class DehydratedException extends BaseException {
constructor() { super('Attempt to detect changes on a dehydrated detector.'); }
}