I need to assign for my variable in ES6 string template a style[bold].
My code looks:
Component
export class AppComponent {
public keyword = '';
public text = '';
onKey(value) {
this.keyword = value;
this.text = `Search for ${this.keyword} with`;
};
}
Template
<input #box class="search-for" type="text" (keyup)="onKey(box.value)">
<p *ngIf="keyword " class="search-line ">{{ text }}</p>
For example, if user types “Angular” then the text will be “Search for Angular with:”
Thank you.