Answers for "ng style"

6

ngstyle

<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Posted by: Guest on August-08-2020
0

ng style

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

ngstyle

content_copy
      
      <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
Posted by: Guest on October-26-2020
0

ng content

<!-- for dynamic content in components -->

<ng-content></ng-content> <!-- in app-component template -->

<app-component>
  <!-- insert html here -->
</app-component>
Posted by: Guest on October-20-2020
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