Created
October 11, 2017 18:29
-
-
Save dherges/babd30bab2dd27f9855d269f71989dbf to your computer and use it in GitHub Desktop.
Angular: Componentful Functions
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
@Component({ | |
selector: 'app-function-works', | |
templateUrl: './function-works.component.html', | |
styleUrls: ['./function-works.component.css'] | |
}) | |
export class FunctionWorksComponent implements OnInit { | |
message = 'foo'; | |
constructor() { } | |
ngOnInit() { | |
this.message = 'bar'; | |
} | |
sayHello() { | |
this.message = 'Hello World'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment