Use OnPush change detection
This commit is contained in:
parent
73f2d54a26
commit
8e954d59db
@ -1,9 +1,10 @@
|
|||||||
import { Component, Input, Inject, LOCALE_ID } from '@angular/core';
|
import { Component, Input, Inject, LOCALE_ID, ChangeDetectionStrategy } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-truncate',
|
selector: 'app-truncate',
|
||||||
templateUrl: './truncate.component.html',
|
templateUrl: './truncate.component.html',
|
||||||
styleUrls: ['./truncate.component.scss']
|
styleUrls: ['./truncate.component.scss'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class TruncateComponent {
|
export class TruncateComponent {
|
||||||
@Input() text: string;
|
@Input() text: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user