@@ -22,25 +22,31 @@ <h2>Set the SVG style</h2>
2222 < fieldset >
2323 < label > height:</ label >
2424 < label > auto < input type ="checkbox " [(ngModel)] ="autoheight " name ="autoheight "> </ label >
25- < span class ="px " *ngIf ="!autoheight "> < input type ="number " min ="0 " max ="1000 " [(ngModel)] ="h " name ="height "> </ span >
25+ @if (!autoheight) {
26+ < span class ="px "> < input type ="number " min ="0 " max ="1000 " [(ngModel)] ="h " name ="height "> </ span >
27+ }
2628 < span style ="margin-left:10px; "> </ span >
2729
2830 < label > width:</ label >
2931 < label > auto < input type ="checkbox " [(ngModel)] ="autowidth " name ="autowidth "> </ label >
30- < span class ="px " *ngIf ="!autowidth "> < input type ="number " min ="0 " max ="1000 " [(ngModel)] ="w " name ="width "> </ span >
32+ @if (!autowidth) {
33+ < span class ="px "> < input type ="number " min ="0 " max ="1000 " [(ngModel)] ="w " name ="width "> </ span >
34+ }
3135 </ fieldset >
3236 < fieldset >
3337 < label > stretch: < input type ="checkbox " [(ngModel)] ="stretch " name ="stretch "> </ label >
3438 </ fieldset >
3539 </ form >
3640
37- < div *ngIf ="display ">
38- < svg-icon [src] ="img[onImg] " [stretch] ="stretch " [svgStyle] ="getNgStyle() "> </ svg-icon >
41+ @if (display){
42+ < div >
43+ < svg-icon [src] ="img[onImg] " [stretch] ="stretch " [svgStyle] ="getNgStyle() "> </ svg-icon >
3944
40- < pre > <svg-icon src="{{img[onImg]}}" [stretch]="{{stretch|json}}"
41- [svgStyle]="{{getStyle()}}">
42- </svg-icon></ pre >
43- </ div >
45+ < pre > <svg-icon src="{{img[onImg]}}" [stretch]="{{stretch|json}}"
46+ [svgStyle]="{{getStyle()}}">
47+ </svg-icon></ pre >
48+ </ div >
49+ }
4450
4551 < div >
4652 < button (click) ="swapImg() "> Swap SVG</ button >
@@ -57,8 +63,10 @@ <h2>Set the SVG style</h2>
5763 the document as can be seen by the persistence of the three < svg-icon src ="assets/images/eye.svg " [svgStyle] ="{ 'width.px': '14'} ">
5864 </ svg-icon > SVG at the top of the page.</ p >
5965
60- < p *ngIf ="!display "> Reloading the SVG will cause an http fetch to occur to load the SVG into the registry
61- where it will persist until programatically unloaded.</ p >
66+ @if (!display) {
67+ < p > Reloading the SVG will cause an http fetch to occur to load the SVG into the registry
68+ where it will persist until programmatically unloaded.</ p >
69+ }
6270 </ div >
6371
6472 < div class ="explain ">
@@ -80,11 +88,15 @@ <h2>Working with CSS classes</h2>
8088</svg-icon></ pre >
8189
8290 < select [(ngModel)] ="svgKlass ">
83- < option *ngFor ="let c of svgKlasses " [value] ="c "> {{c}}</ option >
91+ @for (c of svgKlasses; track c) {
92+ < option [value] ="c "> {{c}}</ option >
93+ }
8494 </ select >
8595
8696 < select [(ngModel)] ="klass ">
87- < option *ngFor ="let c of klasses " [value] ="c "> {{c}}</ option >
97+ @for (c of klasses; track c) {
98+ < option [value] ="c "> {{c}}</ option >
99+ }
88100 </ select >
89101
90102 < button (click) ="applied = !applied "> {{applied ? 'ignore class' : 'apply class'}}</ button >
0 commit comments