Dynamically updating css in Angular 2

Source: https://stackoverflow.com/questions/35882670/dynamically-updating-css-in-angular-2
Try this
 <div class="home-component" 
 [style.width.px]="width" 
 [style.height.px]="height">Some stuff in this div</div>
[Updated]: To set in % use
[style.height.%]="height">Some stuff in this div</div>

Không có nhận xét nào:

‘Connection lost’ / ‘Invalid origin!’ Error with n8n >= 1.87.0 behind Cloudflare Tunnel

 https://community.n8n.io/t/solved-connection-lost-invalid-origin-error-with-n8n-1-87-0-behind-cloudflare-tunnel/99913/1 The Solution:  The ...