Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<div>
<h1>Messages</h1>
<app-message [message]='message'></app-message>
</div>`
})
export class AppComponent implements OnInit {
message: any;
ngOnInit() {
this.message = 'Hello World !';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment