How to bind a property to style.width in pixels?

前端 未结 4 1704
时光取名叫无心
时光取名叫无心 2021-02-05 00:10

I\'m using Angular 2 and I\'ve written the below code:

some texts

I\'ve also tried:

4条回答
  •  逝去的感伤
    2021-02-05 00:55

    Check with same as below once:

    some texts
    export class MyComponent { width: number = 150; }

提交回复
热议问题