Answers for "angular style [style]="

0

ng style

<some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
Posted by: Guest on January-02-2021
0

ng-style

<input type="button" value="set color" ng-click="myStyle={color:'red'}">
<input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
<input type="button" value="clear" ng-click="myStyle={}">
<br/>
<span ng-style="myStyle">Sample Text</span>
<pre>myStyle={{myStyle}}</pre>
Posted by: Guest on October-21-2020

Browse Popular Code Answers by Language