Created
September 11, 2017 09:40
-
-
Save rahulsahay19/967dcd83d3f92c7ff0d655ca2fc7f713 to your computer and use it in GitHub Desktop.
Reviews
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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