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
2 changes: 1 addition & 1 deletion modules/angular2/src/core/change_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export {
ChangeDetectorRef,

WrappedValue,
SimpleChange,
PipeTransform,
PipeOnDestroy,
IterableDiffers,
Expand All @@ -23,5 +24,4 @@ export {
KeyValueDiffers,
KeyValueDiffer,
KeyValueDifferFactory

} from './change_detection/change_detection';
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export {ChangeDetectorRef} from './change_detector_ref';
export {IterableDiffers, IterableDiffer, IterableDifferFactory} from './differs/iterable_differs';
export {KeyValueDiffers, KeyValueDiffer, KeyValueDifferFactory} from './differs/keyvalue_differs';
export {PipeTransform, PipeOnDestroy} from './pipe_transform';
export {WrappedValue} from './change_detection_util';
export {WrappedValue, SimpleChange} from './change_detection_util';

/**
* Structural diffing for `Object`s and `Map`s.
Expand Down
3 changes: 2 additions & 1 deletion modules/angular2/src/core/compiler/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StringMap, MapWrapper} from 'angular2/src/core/facade/collection';
import {SimpleChange} from 'angular2/src/core/change_detection/change_detection_util';

export enum LifecycleHooks {
OnInit,
Expand Down Expand Up @@ -60,7 +61,7 @@ export var LIFECYCLE_HOOKS_VALUES = [
* }
* ```
*/
export interface OnChanges { onChanges(changes: StringMap<string, any>); }
export interface OnChanges { onChanges(changes: StringMap<string, SimpleChange>); }

/**
* Notify a directive when it has been checked the first time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {StringMap} from 'angular2/src/core/facade/collection';
import {OnChanges, OnDestroy} from 'angular2/lifecycle_hooks';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
import {forwardRef, Host, SkipSelf, Binding, Inject, Optional} from 'angular2/src/core/di';

Expand Down Expand Up @@ -93,7 +94,7 @@ export class NgControlName extends NgControl implements OnChanges,
this.validators = validators;
}

onChanges(changes: StringMap<string, any>) {
onChanges(changes: StringMap<string, SimpleChange>) {
if (!this._added) {
this.formDirective.addControl(this);
this._added = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {OnChanges} from 'angular2/lifecycle_hooks';
import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
import {forwardRef, Binding, Inject, Optional} from 'angular2/src/core/di';
import {NgControl} from './ng_control';
Expand Down Expand Up @@ -66,7 +67,7 @@ export class NgFormControl extends NgControl implements OnChanges {
this.validators = validators;
}

onChanges(changes: StringMap<string, any>): void {
onChanges(changes: StringMap<string, SimpleChange>): void {
if (!this._added) {
setUpControl(this.form, this);
this.form.updateValidity();
Expand Down
5 changes: 2 additions & 3 deletions modules/angular2/src/core/forms/directives/ng_model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';

import {OnChanges} from 'angular2/lifecycle_hooks';

import {SimpleChange} from 'angular2/src/core/change_detection';
import {Query, Directive} from 'angular2/src/core/metadata';
import {forwardRef, Binding, Inject, Optional} from 'angular2/src/core/di';
import {NgControl} from './ng_control';
Expand Down Expand Up @@ -47,7 +46,7 @@ export class NgModel extends NgControl implements OnChanges {
this.validators = validators;
}

onChanges(changes: StringMap<string, any>) {
onChanges(changes: StringMap<string, SimpleChange>) {
if (!this._added) {
setUpControl(this._control, this);
this._control.updateValidity();
Expand Down
5 changes: 3 additions & 2 deletions modules/angular2/test/compiler/runtime_metadata_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import {
AfterContentInit,
AfterContentChecked,
AfterViewInit,
AfterViewChecked
AfterViewChecked,
SimpleChange
} from 'angular2/core';

import {TEST_BINDINGS} from './test_bindings';
Expand Down Expand Up @@ -114,7 +115,7 @@ class DirectiveWithoutModuleId {
class ComponentWithEverything implements OnChanges,
OnInit, DoCheck, OnDestroy, AfterContentInit, AfterContentChecked, AfterViewInit,
AfterViewChecked {
onChanges(changes: StringMap<string, any>): void {}
onChanges(changes: StringMap<string, SimpleChange>): void {}
onInit(): void {}
doCheck(): void {}
onDestroy(): void {}
Expand Down
6 changes: 6 additions & 0 deletions modules/angular2/test/public_api_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,12 @@ var NG_API = [
'SlicePipe',
'SlicePipe.supports()',
'SlicePipe.transform()',
'SimpleChange',
'SimpleChange.currentValue',
'SimpleChange.currentValue=',
'SimpleChange.previousValue',
'SimpleChange.previousValue=',
'SimpleChange.isFirstChange()',
'TemplateRef',
'TemplateRef.elementRef',
'TemplateRef.elementRef=',
Expand Down