ngOnChanges example

Source: https://www.concretepage.com/angular-2/angular-2-4-onchanges-simplechanges-example

import {Component, OnChanges, SimpleChanges, Input} from '@angular/core';

import { Employee } from './employee';
 
@Component({
  selector: 'app-emp',
  templateUrl: './employee.component.html'
})
export class EmployeeComponent implements OnChanges {
  @Input() employee: Employee; 
  @Input() message: string; 

  ngOnChanges(changes: SimpleChanges) {
     for (let propName in changes) {  
       let change = changes[propName];
       let curVal  = JSON.stringify(change.currentValue);
       let prevVal = JSON.stringify(change.previousValue);

       console.log(curVal);
       console.log(prevVal);
     }
  }
}

Không có nhận xét nào:

‘Connection lost’ / ‘Invalid origin!’ Error with n8n >= 1.87.0 behind Cloudflare Tunnel

 https://community.n8n.io/t/solved-connection-lost-invalid-origin-error-with-n8n-1-87-0-behind-cloudflare-tunnel/99913/1 The Solution:  The ...