perf(ivy): add static style to the list of scenarios (#34775)
PR Close #34775
This commit is contained in:
parent
c2766f4e82
commit
6cdfa73dd0
|
@ -20,6 +20,7 @@
|
||||||
<option value="5">(5) class="foo" [ngClass]="{bar: boolExp}" (mix of static class and ngClass binding)</option>
|
<option value="5">(5) class="foo" [ngClass]="{bar: boolExp}" (mix of static class and ngClass binding)</option>
|
||||||
<option value="6">(6) class="foo" [ngStyle]="{width: 10px}" [style.background-color]="exp" (Sierpinski's triangle)
|
<option value="6">(6) class="foo" [ngStyle]="{width: 10px}" [style.background-color]="exp" (Sierpinski's triangle)
|
||||||
</option>
|
</option>
|
||||||
|
<option value="7">(7) style="color: red" (static styling)</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<button id="create">create</button>
|
<button id="create">create</button>
|
||||||
|
|
|
@ -19,9 +19,10 @@ import {BrowserModule} from '@angular/platform-browser';
|
||||||
<ng-template #t4><button class="foo" [class.bar]="exp ==='bar'"></button></ng-template>
|
<ng-template #t4><button class="foo" [class.bar]="exp ==='bar'"></button></ng-template>
|
||||||
<ng-template #t5><button class="foo" [ngClass]="{bar: exp ==='bar'}"></button></ng-template>
|
<ng-template #t5><button class="foo" [ngClass]="{bar: exp ==='bar'}"></button></ng-template>
|
||||||
<ng-template #t6><button class="foo" [ngStyle]="staticStyle" [style.background-color]="exp"></button></ng-template>
|
<ng-template #t6><button class="foo" [ngStyle]="staticStyle" [style.background-color]="exp"></button></ng-template>
|
||||||
|
<ng-template #t7><button style="color: red"></button></ng-template>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ng-template ngFor [ngForOf]="data" [ngForTemplate]="getTplRef(t0, t1, t2, t3, t4, t5, t6)"></ng-template>
|
<ng-template ngFor [ngForOf]="data" [ngForTemplate]="getTplRef(t0, t1, t2, t3, t4, t5, t6, t7)"></ng-template>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,7 +16,8 @@ const SCENARIOS = [
|
||||||
{optionIndex: 2, id: 'static_class_with_interpolation'}, {optionIndex: 3, id: 'class_binding'},
|
{optionIndex: 2, id: 'static_class_with_interpolation'}, {optionIndex: 3, id: 'class_binding'},
|
||||||
{optionIndex: 4, id: 'static_class_and_class_binding'},
|
{optionIndex: 4, id: 'static_class_and_class_binding'},
|
||||||
{optionIndex: 5, id: 'static_class_and_ngclass_binding'},
|
{optionIndex: 5, id: 'static_class_and_ngclass_binding'},
|
||||||
{optionIndex: 6, id: 'static_class_and_ngstyle_binding_and_style_binding'}
|
{optionIndex: 6, id: 'static_class_and_ngstyle_binding_and_style_binding'},
|
||||||
|
{optionIndex: 7, id: 'static_style'}
|
||||||
];
|
];
|
||||||
|
|
||||||
describe('styling benchmark spec', () => {
|
describe('styling benchmark spec', () => {
|
||||||
|
|
Loading…
Reference in New Issue