1
结合我有这样低于组件:如何CSS样式从打字稿方法与角度
@Component({
selector: 'app-car-item',
templateUrl: './car-item.component.html',
styleUrls: ['./car-item.component.css'],
})
export class CarItemComponent {
public style: string
addStyle() {
this.style = 'font-size: 20px'
}
我如何能实现addStyle()
方法来改变字体大小在汽车item.component.css?
对不起,我是Angular的新手。我在哪里必须添加这一行:[style.font-size.px] =“{{fontSize}}”? – Luki
在你想要改变字体大小的模板上: