diff --git a/modules/@angular/compiler/src/view_compiler/compile_view.ts b/modules/@angular/compiler/src/view_compiler/compile_view.ts index 30db560529..b76043a032 100644 --- a/modules/@angular/compiler/src/view_compiler/compile_view.ts +++ b/modules/@angular/compiler/src/view_compiler/compile_view.ts @@ -49,7 +49,6 @@ export class CompileView implements NameResolver { public fields: o.ClassField[] = []; public getters: o.ClassGetter[] = []; public disposables: o.Expression[] = []; - public subscriptions: o.Expression[] = []; public componentView: CompileView; public purePipes = new Map(); diff --git a/modules/@angular/compiler/src/view_compiler/view_builder.ts b/modules/@angular/compiler/src/view_compiler/view_builder.ts index fc667dbbb0..17739360c8 100644 --- a/modules/@angular/compiler/src/view_compiler/view_builder.ts +++ b/modules/@angular/compiler/src/view_compiler/view_builder.ts @@ -541,8 +541,8 @@ function generateCreateMethod(view: CompileView): o.Statement[] { 'init', [ createFlatArray(view.rootNodesOrAppElements), - o.literalArr(view.nodes.map(node => node.renderNode)), o.literalArr(view.disposables), - o.literalArr(view.subscriptions) + o.literalArr(view.nodes.map(node => node.renderNode)), + o.literalArr(view.disposables), ]) .toStmt(), new o.ReturnStatement(resultExpr) diff --git a/modules/@angular/core/src/linker/view.ts b/modules/@angular/core/src/linker/view.ts index f9b3057784..9d5e70d786 100644 --- a/modules/@angular/core/src/linker/view.ts +++ b/modules/@angular/core/src/linker/view.ts @@ -33,7 +33,6 @@ export abstract class AppView { rootNodesOrAppElements: any[]; allNodes: any[]; disposables: Function[]; - subscriptions: any[]; contentChildren: AppView[] = []; viewChildren: AppView[] = []; viewContainerElement: AppElement = null; @@ -98,13 +97,10 @@ export abstract class AppView { */ createInternal(rootSelectorOrNode: string|any): AppElement { return null; } - init( - rootNodesOrAppElements: any[], allNodes: any[], disposables: Function[], - subscriptions: any[]) { + init(rootNodesOrAppElements: any[], allNodes: any[], disposables: Function[]) { this.rootNodesOrAppElements = rootNodesOrAppElements; this.allNodes = allNodes; this.disposables = disposables; - this.subscriptions = subscriptions; if (this.type === ViewType.COMPONENT) { // Note: the render nodes have been attached to their host element // in the ViewFactory already. @@ -164,9 +160,6 @@ export abstract class AppView { for (var i = 0; i < this.disposables.length; i++) { this.disposables[i](); } - for (var i = 0; i < this.subscriptions.length; i++) { - this.subscriptions[i].unsubscribe(); - } this.destroyInternal(); this.dirtyParentQueriesInternal();