Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created September 11, 2017 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/967dcd83d3f92c7ff0d655ca2fc7f713 to your computer and use it in GitHub Desktop.
Save rahulsahay19/967dcd83d3f92c7ff0d655ca2fc7f713 to your computer and use it in GitHub Desktop.
Reviews
import {
Component,
OnInit,
Input,
OnChanges,
SimpleChanges,
DoCheck,
AfterContentInit
} 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 {
@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.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment