Use OnPush change detection

This commit is contained in:
softsimon 2023-01-17 03:22:18 +04:00
parent 73f2d54a26
commit 8e954d59db
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -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;