Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created September 11, 2017 09:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rahulsahay19/da7e3489769d5db186a80216f66410f8 to your computer and use it in GitHub Desktop.
reviews
import {
Component,
OnInit,
Input,
OnChanges,
SimpleChanges,
DoCheck,
AfterContentInit,
AfterContentChecked
} from '@angular/core';
import { Review,REVIEWS } from '../Models/Review';
@Component({
selector: 'app-reviews',
templateUrl: './reviews.component.html',
styleUrls: ['./reviews.component.css']
})
export class ReviewsComponent implements OnInit, OnChanges, DoCheck, AfterContentInit, AfterContentChecked {
@Input('reviews') review: Review;
constructor() {
console.log("Contstructor Called!")
}
ngOnInit() {
console.log("ngOnInit Called!")
}
ngOnChanges(changes: SimpleChanges) {
console.log("onChanges called!");
console.log(changes);
}
ngDoCheck() {
console.log("ngDoCheck called!")
}
ngAfterContentInit(){
console.log("ngAfterContentInit called!")
}
ngAfterContentChecked() {
console.log("ngAfterContentChecked called!")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment