We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pWidth = '100'
<p [ngStyle]="{'width.px': pWidth}"></p>
showP = false
<p [ngStyle]="{'display': showP ? 'block': 'none'}"></p>
@Component({ selector : 'p-sample', host : { '[style.color]' : `'red'` } })
<p [style.color]="'red'"></p>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ngStyle
添加变量到ngStyle中
根据变量添加不同属性
花式添加style
ts中直接在组件顶层dom添加style
html中添加style
The text was updated successfully, but these errors were encountered: