CopyPastor

Detecting plagiarism made easy.

Score: 0.8174502154973549; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-09-06
by Tony Ngo

Original Post

Original - Posted on 2016-07-25
by muetzerich



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Use the ngOnChanges() lifecycle method in your component.
> ngOnChanges is called right after the data-bound properties have been > checked and before view and content children are checked if at least > one of them has changed.
Some like this
@Input() object: string; ngOnChanges(changes: SimpleChanges) { console.log(changes.object.currentValue); // You can also use object.previousValue and // object.firstChange for comparing old and new values }
Use the `ngOnChanges()` lifecycle method in your component.
> ngOnChanges is called right after the data-bound properties have been > checked and before view and content children are checked if at least > one of them has changed.
Here are the [Docs][1].

[1]: https://angular.io/docs/ts/latest/api/core/index/OnChanges-class.html

        
Present in both answers; Present only in the new answer; Present only in the old answer;