perf(ivy): add static style to the list of scenarios (#34775)

PR Close #34775
This commit is contained in:
Pawel Kozlowski 2020-01-14 18:08:15 +01:00 committed by atscott
parent c2766f4e82
commit 6cdfa73dd0
3 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@
<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>
<option value="7">(7) style="color: red" (static styling)</option>
</select>
<button id="create">create</button>

View File

@ -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 #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 #t7><button style="color: red"></button></ng-template>
<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>
`
})

View File

@ -16,7 +16,8 @@ const SCENARIOS = [
{optionIndex: 2, id: 'static_class_with_interpolation'}, {optionIndex: 3, id: 'class_binding'},
{optionIndex: 4, id: 'static_class_and_class_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', () => {