Created
August 27, 2019 16:39
-
-
Save hetdev/e4e63cb63ea8253dd96f8b83e82a53e1 to your computer and use it in GitHub Desktop.
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, Input, OnChanges, OnInit, SimpleChange} from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent implements OnInit, OnChanges { | |
title = 'phoenix-wc-wiki-ngx-lt'; | |
@Input() token: string; | |
constructor() { | |
console.log('token constructor=' + this.token); | |
} | |
ngOnInit() { | |
console.log('token ngOnInit=' + this.token); | |
} | |
ngOnChanges(changes: {[token: string]: SimpleChange}) { | |
// check the object "changes" for new data | |
console.log('token ngOnChanges=' + this.token); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment