I have a component that all it does is render , its something like this:
@Component({
selector: \'my-comp\',
host: ???,
template: `
You use the class
and style
prefix for this. Here is a sample:
@Component({
selector: 'my-comp',
host: {
'[class.className]': 'isChanged'
},
template: `
`
})
export default class MyComp {
@Input() title: string;
public isChanged: boolean;
}
See the Günter's answer for more details: