Skip to content

Commit 0830959

Browse files
plchampignymanucorporat
authored andcommitted
fix(angular): ChangeDetectionStrategy.OnPush to generated angular bindings (#1575)
1 parent d9881f6 commit 0830959

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/compiler/output-targets/output-angular.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function generateProxies(config: d.Config, compilerCtx: d.CompilerCtx, bui
4242

4343
const imports = `/* tslint:disable */
4444
/* auto-generated angular directive proxies */
45-
import { Component, ElementRef, ChangeDetectorRef, EventEmitter } from '@angular/core';`;
45+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter } from '@angular/core';`;
4646

4747
const sourceImports = !outputTarget.componentCorePackage ?
4848
`import { Components } from '${componentsTypeFile}';` :
@@ -80,7 +80,7 @@ function getProxy(cmpMeta: d.ComponentCompilerMeta) {
8080
// Generate Angular @Directive
8181
const directiveOpts = [
8282
`selector: \'${cmpMeta.tagName}\'`,
83-
`changeDetection: 0`,
83+
`changeDetection: ChangeDetectionStrategy.OnPush`,
8484
`template: '<ng-content></ng-content>'`
8585
];
8686
if (inputs.length > 0) {

0 commit comments

Comments
 (0)