I have my custom component:
@Component({
selector: 'my-custom-component',
templateUrl: './my-custom-component.html',
styleUrls: ['./my-custom-component.css']
})
export class MyCustomComponent {
constructor() {
console.log('myCustomComponent');
}
}
I can use it like this:
<my-custom-component></my-custom-component>
But how I can pass a variable? For example:
<my-custom-component custom-title="My Title"></my-custom-component>
And use this in my component code?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…