X Tutup
Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions docs/typescript-definition-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,21 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
{
id: 'angular2/router',
references: ['./angular2.d.ts'],
remapTypes: {Type: 'ng.Type'},
remapTypes: {Type: 'ng.Type', InjectableReference: 'ng.InjectableReference'},
modules: {'angular2/router': {namespace: 'ngRouter', id: 'angular2/router'}}
},
{
id: 'angular2/http',
references: ['./angular2.d.ts'],
remapTypes: {Type: 'ng.Type', Observable: 'ng.Observable', EventEmitter: 'ng.EventEmitter'},
remapTypes: {Type: 'ng.Type', Observable: 'ng.Observable', EventEmitter: 'ng.EventEmitter', InjectableReference: 'ng.InjectableReference' },
modules: {'angular2/http': {namespace: 'ngHttp', id: 'angular2/http'}}
},
{
id: 'angular2/test_lib',
references: ['./angular2.d.ts', '../jasmine/jasmine.d.ts'],
remapTypes: {
Type: 'ng.Type',
Binding: 'ng.Binding',
ViewMetadata: 'ng.ViewMetadata',
Injector: 'ng.Injector',
Predicate: 'ng.Predicate',
ElementRef: 'ng.ElementRef',
DebugElement: 'ng.DebugElement'
},
remapTypes: { Type: 'ng.Type', Binding: 'ng.Binding', ViewMetadata: 'ng.ViewMetadata', Injector: 'ng.Injector',
Predicate: 'ng.Predicate', ElementRef: 'ng.ElementRef', DebugElement: 'ng.DebugElement',
InjectableReference: 'ng.InjectableReference' },
modules: {'angular2/test_lib': {namespace: 'ngTestLib', id: 'angular2/test_lib'}}
}
];
Expand Down
2 changes: 1 addition & 1 deletion modules/angular2/angular2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './core';
export * from './profile';
export * from './lifecycle_hooks';
export * from './bootstrap';
export * from './bootstrap';
5 changes: 0 additions & 5 deletions modules/angular2/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ export * from './src/core/directives';
export * from './src/core/forms';
export * from './src/core/debug';
export * from './src/core/change_detection';
export {Reflector, ReflectionInfo} from './src/core/reflection/reflection';
export {
PlatformReflectionCapabilities
} from './src/core/reflection/platform_reflection_capabilities';
export {SetterFn, GetterFn, MethodFn} from './src/core/reflection/types';
1 change: 0 additions & 1 deletion modules/angular2/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export {BaseRequestOptions, RequestOptions} from './src/http/base_request_option
export {BaseResponseOptions, ResponseOptions} from './src/http/base_response_options';
export {XHRBackend, XHRConnection} from './src/http/backends/xhr_backend';
export {JSONPBackend, JSONPConnection} from './src/http/backends/jsonp_backend';
export {BrowserJsonp} from './src/http/backends/browser_jsonp';
export {Http, Jsonp} from './src/http/http';

export {Headers} from './src/http/headers';
Expand Down
37 changes: 0 additions & 37 deletions modules/angular2/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,12 @@

export {Router, RootRouter} from './src/router/router';
export {RouterOutlet} from './src/router/router_outlet';
export {
DynamicComponentLoader,
ComponentRef,
ElementRef,
Compiler,
AppViewManager,
ViewRef,
HostViewRef,
ProtoViewRef,
ViewContainerRef,
TemplateRef
} from './core';
export {
Renderer,
RenderElementRef,
RenderViewRef,
RenderProtoViewRef,
RenderEventDispatcher,
RenderFragmentRef,
RenderViewWithFragments
} from './render';
export {
Binding,
Injector,
ResolvedBinding,
Key,
Dependency,
ProtoInjector,
DependencyProvider,
BindingWithVisibility,
Visibility,
ResolvedFactory
} from './src/core/di';
export {RouterLink} from './src/router/router_link';
export {RouteParams} from './src/router/instruction';
export {RouteRegistry} from './src/router/route_registry';
export {LocationStrategy} from './src/router/location_strategy';
export {HashLocationStrategy} from './src/router/hash_location_strategy';
export {PathLocationStrategy} from './src/router/path_location_strategy';
export {PathRecognizer, PathMatch} from './src/router/path_recognizer';
export {RouteHandler} from './src/router/route_handler';
export {Location, APP_BASE_HREF} from './src/router/location';
export {Pipeline} from './src/router/pipeline';
export * from './src/router/route_config_decorator';
Expand Down Expand Up @@ -108,8 +73,6 @@ export const ROUTER_BINDINGS: any[] = CONST_EXPR([
}))
]);

export interface InjectableReference {}

function routerFactory(registry, pipeline, location, appRoot) {
return new RootRouter(registry, pipeline, location, appRoot);
}
13 changes: 3 additions & 10 deletions modules/angular2/src/core/change_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ export {
IterableDifferFactory,
KeyValueDiffers,
KeyValueDiffer,
KeyValueDifferFactory,
Lexer,
Parser,
ChangeDispatcher,
BindingTarget,
DirectiveIndex,
DebugContext,
ProtoChangeDetector
} from 'angular2/src/core/change_detection/change_detection';
export * from 'angular2/src/core/change_detection/parser/ast';
KeyValueDifferFactory

} from './change_detection/change_detection';
10 changes: 9 additions & 1 deletion modules/angular2/src/core/change_detection/change_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ import {
import {Injector, Inject, Injectable, OpaqueToken, Optional, Binding} from 'angular2/src/core/di';
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {CONST, CONST_EXPR, isPresent, assertionsEnabled} from 'angular2/src/core/facade/lang';
export * from './parser/ast';

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

export {Lexer} from './parser/lexer';
export {Parser} from './parser/parser';
Expand Down
10 changes: 0 additions & 10 deletions modules/angular2/src/core/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,4 @@ export {ElementRef} from './compiler/element_ref';
export {TemplateRef} from './compiler/template_ref';
export {ViewRef, HostViewRef, ProtoViewRef} from './compiler/view_ref';
export {ViewContainerRef} from './compiler/view_container_ref';
export {AppView, AppProtoView, AppProtoViewMergeMapping, AppViewContainer} from './compiler/view';
export {ComponentRef} from './compiler/dynamic_component_loader';
export {
ElementInjector,
PreBuiltObjects,
TreeNode,
ProtoElementInjector,
DirectiveBinding,
EventEmitterAccessor
} from './compiler/element_injector';
export {ElementBinder} from './compiler/element_binder';
9 changes: 4 additions & 5 deletions modules/angular2/src/core/debug/debug_element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ import {ElementRef} from 'angular2/src/core/compiler/element_ref';
export class DebugElement {
_elementInjector: ElementInjector;

/**
* @private
*/
constructor(private _parentView: AppView, private _boundElementIndex: number) {
this._elementInjector = this._parentView.elementInjectors[this._boundElementIndex];
}

static create(elementRef: ElementRef): DebugElement {
return new DebugElement(internalView(elementRef.parentView), elementRef.boundElementIndex);
}

get componentInstance(): any {
if (!isPresent(this._elementInjector)) {
return null;
Expand Down Expand Up @@ -144,7 +143,7 @@ export class DebugElement {
* @return {DebugElement}
*/
export function inspectElement(elementRef: ElementRef): DebugElement {
return DebugElement.create(elementRef);
return new DebugElement(internalView(elementRef.parentView), elementRef.boundElementIndex);
}

export function asNativeElements(arr: DebugElement[]): any[] {
Expand Down
2 changes: 0 additions & 2 deletions modules/angular2/src/core/pipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ export {LimitToPipe} from './pipes/limit_to_pipe';
export {LowerCasePipe} from './pipes/lowercase_pipe';
export {NumberPipe, DecimalPipe, PercentPipe, CurrencyPipe} from './pipes/number_pipe';
export {UpperCasePipe} from './pipes/uppercase_pipe';
export {ProtoPipes} from './pipes/pipes';
export {PipeBinding} from './pipes/pipe_binding';
9 changes: 1 addition & 8 deletions modules/angular2/src/core/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,5 @@ export {
ViewDefinition,
DOCUMENT,
APP_ID,
MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE,
EventManager,
SharedStylesHost,
DomSharedStylesHost,
TemplateCloner,
ViewType,
RenderProtoViewMergeMapping,
EventManagerPlugin
MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE
} from './render/render';
3 changes: 3 additions & 0 deletions modules/angular2/src/core/render/dom/dom_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const REFLECT_PREFIX: string = 'ng-reflect-';
export class DomRenderer extends Renderer {
_document;

/**
* @private
*/
constructor(private _eventManager: EventManager,
private _domSharedStylesHost: DomSharedStylesHost,
private _templateCloner: TemplateCloner, @Inject(DOCUMENT) document) {
Expand Down
3 changes: 0 additions & 3 deletions modules/angular2/src/core/render/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ export * from './dom/compiler/compiler';
export * from './dom/dom_renderer';
export * from './dom/dom_tokens';
export * from './dom/template_cloner';
export * from './dom/events/event_manager';
export * from './dom/view/shared_styles_host';
export * from './dom/template_cloner';
export * from './api';
6 changes: 6 additions & 0 deletions modules/angular2/src/http/backends/jsonp_backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export class JSONPConnection implements Connection {
private _responseData: any;
private _finished: boolean = false;

/**
* @private
*/
constructor(req: Request, private _dom: BrowserJsonp,
private baseResponseOptions?: ResponseOptions) {
if (req.method !== RequestMethods.Get) {
Expand Down Expand Up @@ -91,6 +94,9 @@ export class JSONPConnection implements Connection {

@Injectable()
export class JSONPBackend implements ConnectionBackend {
/**
* @private
*/
constructor(private _browserJSONP: BrowserJsonp, private _baseResponseOptions: ResponseOptions) {}
createConnection(request: Request): JSONPConnection {
return new JSONPConnection(request, this._browserJSONP, this._baseResponseOptions);
Expand Down
3 changes: 3 additions & 0 deletions modules/angular2/src/router/instruction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ function stringifyAux(instruction: Instruction): string {
export class ComponentInstruction {
reuse: boolean = false;

/**
* @private
*/
constructor(public urlPath: string, public urlParams: string[],
private _recognizer: PathRecognizer, public params: StringMap<string, any> = null) {}

Expand Down
3 changes: 3 additions & 0 deletions modules/angular2/src/router/router_outlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export class RouterOutlet {
private _componentRef: ComponentRef = null;
private _currentInstruction: ComponentInstruction = null;

/**
* @private
*/
constructor(private _elementRef: ElementRef, private _loader: DynamicComponentLoader,
private _parentRouter: routerMod.Router, @Attribute('name') nameAttr: string) {
if (isPresent(nameAttr)) {
Expand Down
8 changes: 6 additions & 2 deletions modules/angular2/src/test_lib/test_component_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ import {DOM} from 'angular2/src/core/dom/dom_adapter';

import {DebugElement} from 'angular2/src/core/debug/debug_element';

export class RootTestComponent extends DebugElement {
export class RootTestComponent {
_componentRef: ComponentRef;
_componentParentView: AppView;
debugElement: DebugElement;

/**
* @private
*/
constructor(componentRef: ComponentRef) {
super(internalView(<ViewRef>componentRef.hostView), 0);
this.debugElement = new DebugElement(internalView(<ViewRef>componentRef.hostView), 0);

this._componentParentView = internalView(<ViewRef>componentRef.hostView);
this._componentRef = componentRef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export {Type} from "angular2/src/core/facade/lang";

@Injectable()
export class ClientMessageBrokerFactory {
/**
* @private
*/
constructor(private _messageBus: MessageBus, protected _serializer: Serializer) {}

/**
Expand All @@ -31,6 +34,9 @@ export class ClientMessageBroker {
private _pending: Map<string, PromiseCompleter<any>> = new Map<string, PromiseCompleter<any>>();
private _sink: EventEmitter;

/**
* @private
*/
constructor(messageBus: MessageBus, protected _serializer: Serializer, public channel) {
this._sink = messageBus.to(channel);
var source = messageBus.from(channel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import {

@Injectable()
export class ServiceMessageBrokerFactory {
/**
* @private
*/
constructor(private _messageBus: MessageBus, protected _serializer: Serializer) {}

/**
Expand All @@ -33,6 +36,9 @@ export class ServiceMessageBroker {
private _sink: EventEmitter;
private _methods: Map<string, Function> = new Map<string, Function>();

/**
* @private
*/
constructor(messageBus: MessageBus, private _serializer: Serializer, public channel) {
this._sink = messageBus.to(channel);
var source = messageBus.from(channel);
Expand Down
Loading
X Tutup