import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
}
<h1>
{{title}}
</h1>
@Component({
selector: 'test-component'
})
<test-component></test-component>
import { Component, Input } from '@angular/core';
@Component({
selector: 'test-component',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class TestComponent{
@Input() title;
}
<test-component [title]="parentProperty"></test-component>
We save your email address, your name and your profile picture on our servers when you sing in. Read more in our Privacy Policy.