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); } } }
Đăng ký:
Đăng Nhận xét (Atom)
xóa toàn bộ commit
Cách chuẩn & đơn giản nhất (Khuyến nghị) Mục tiêu Xóa toàn bộ commit history Giữ nguyên code hiện tại main chỉ còn 1 commit...
-
html5 video - What is a blob URL and why it is used? - Stack Overflow Blob URLs (ref W3C , official name) or Object-URLs (ref. MDN and ...
-
Source: https://indepth.dev/stop-using-shared-material-module/ This article describes an experiment that shows why using the SharedMate...
-
Source: https://www.infoworld.com/article/3206264/application-development/how-to-perform-partial-updates-to-rest-web-api-resources.html T...
Không có nhận xét nào:
Đăng nhận xét