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